For this mod 4 prework exercise the goal was to create a node HTTP server. The server contains both GET and POST commands.
- Clone down repo.
- Run
npm install
- Run
nodemon server.js
Use Postman for requests.
- GET Request:
- In Postman create a 'GET' request to
http://localhost:3000
- In Postman create a 'GET' request to
- POST Request:
- In Postman create a 'POST' request to
http://localhost:3000
- Set the header to
{ "Content-Type": "application/json" }
- Set the body to
{ "user": "your-name-here", "message": "Your-message-here" }
- In Postman create a 'POST' request to