Giter Club home page Giter Club logo

express_api_for_quotes_exercise's Introduction

Quotes API (Express)

This repository holds my solution for the codecademy project "Quote API". It is a presentation project for implementing the basic CRUD operations in a project.

made-with-javascript made-with-express made-with-html made-with-css

Objecive

I was asked to build a small JSON API, to serve up famous quotes about computers, technology, and programming. The data (quotes) were given as an array of objects:

const quotes = [
  {
    quote: 'We build our computer (systems) the way we build our cities: over time, without a plan, on top of ruins.',
    person: 'Ellen Ullman'
  }
]

Requirements

There are eight steps in total to complete the project. Seven of them are required.

  • Express Routes and Express Routers lessons have to be completed in order to take this project.
  • As you built the app you can use the front end to interact with the operations or Postman tool.
  • Set your server to listen on the PORT.
  • Your API should have a GET /api/quotes/random route. It should send back a random quote from the data
  • Your API should have a GET /api/quotes route. It should return all quotes from the data.
  • Your API should have a POST /api/quotes route for adding new quotes to the data.
  • Finished. Great work!.

Extra Step

  • Add a PUT route for updating quotes in the data.
  • Add a DELETE route for deleting quotes from the data array.

Conclution

I am happy that I was able to complete this porject as I am learning how Express works. It helped me to clarify few consepts regarding REST APIs and CRUD operations that I could not understand. It was fun and I believe that anyone learning Express or other frameworks should try similar projects. Experience comes with coding.

If you want to check my solution run the code below inside project folder

npm install
node express.js

Then you can go to http://localhost:4001/ to interactwith the app

express_api_for_quotes_exercise's People

Contributors

koiranos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.