Travis: https://travis-ci.com/khuynh92/08-rest
Heroku: https://khoa-08-rest.herokuapp.com
PR: #1
in order to run this app:
-
clone this repository
-
in your root folder, create a .env file and set PORT to your desired port. example:
PORT = 3000
-
in your terminal, locate where you cloned this repository, and then type the command:
npm start
-
in your broswer go to
http://localhost:<YOURPORTHERE>
-
Here, you can test different RESTful routes to ensure GET requests are working for
/api/v1/pizza
http://localhost::<YOURPORTHERE>/api/v1/pizza?id=hello world!
-
To test POST, use your choice of of tools that makes requests to servers (httpie, postman). Make sure to send an object body, or a 400 error will appear. POST requests will only work on api/v1/pizza.
-
To test POST, use your choice of of tools that makes requests to servers (httpie, postman). Make sure to send an object body, or a 400 error will appear. If no id query is passed, a 404 error will appear. POST requests will only work on pathnames with id queries api/v1/pizza/?id=youridhere.
-
To test DELETE, use your choice of of tools that makes requests to servers (httpie, postman). If no id query is passed, a 404 error will appear. DELETE requests will only work on pathnames with id queries: api/v1/pizza/?id=youridhere.