express-review

Setup

  • npm install
  • npm run build
  • npm start

Step 1

  • Create an express server that will listen on port 3003
  • Give it some middleware

Step 2

  • Create a get route to return all restaurants
  • Create a get route to return a specific restaurant
  • Test via Postman

Step 3

  • Create a post route to add a restaurant
  • Create a delete route to remove a restaurant
  • Test via Postman

Step 4

  • Serve your client to the port you're listening on using your express server

Step 5

  • Create a function on your client that will make a get request to your server to get all restaurants
  • Create a function on your client that will make a post request to your server to add a restaurant
  • Create a function on your client that will make a delete request to your server to delete a restaurant

EXTRA CREDIT

  • Refactor your server to connect to your database instead of using the data from restaurants.json
  • Add an update route
  • Add an additional endpoint to your server