With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy.
- Express
git clone git@github.com:rwieruch/node-express-server-rest-api.git
cd node-express-server-rest-api
npm install
npm start
- optional: include .env in your .gitignore
- visit http://localhost:3003
- /products
- /products/1
- Install Postman to interact with REST API
- Create a message with:
- URL: http://localhost:3003/products
- Method: POST
- Body: raw + JSON (application/json)
- Body Content:
{ "name": "Iphone 11" }
- Delete a message with:
- URL: http://localhost:3003/products/1
- Method: DELETE
Feito com ♥ by Cássio Freitas