- Babel 7
- mongoose
- Environment Variables
- Express
- REST API
- visit http://localhost:3002
- /messages
- /messages/1
- /users
- /users/1
- Create a message with:
curl -X POST -H "Content-Type:application/json" http://localhost:3002/messages -d '{"text":"Hi again, World"}'
- Delete a message with:
curl -X DELETE -H "Content-Type:application/json" http://localhost:3002/messages/1
- Install Postman to interact with REST API
- Create a message with:
- URL: http://localhost:3002/messages
- Method: POST
- Body: raw + JSON (application/json)
- Body Content:
{ "text": "Hi again, World" }
- Delete a message with:
- URL: http://localhost:3002/messages/1
- Method: DELETE