Voici une petite API REST NodeJs avec MongoDb. Différentes opérations CRUD.
NodeJs doit être installé : https://nodejs.org/en/download/
Pour la base de données, j'utilise MongoDb : https://www.mongodb.com/fr
//on local
- git clone https://github.com/Dramane-dev/mongo_api.git
- cd mongo-api
- npm i
- npm i express
- npm i mongoose
- npm i mongoDb
- npm i body-parser
- npm start
link to download postman : https://www.postman.com/downloads/
Les requêtes à utiliser sur postman :
- GET
(http://localhost:3030/users) - GET
(http://localhost:3030/user/1) - POST
(http://localhost:3030/user) - DELETE
(http://localhost:3030/user/1)