-
Go to the link and download mongodb. [MongoDB Page] https://www.mongodb.com/download-center/community
-
Go to the link and download nodejs. [NodeJS Page] https://nodejs.org/en/download/
-
Start mongodb service
mongod
- in the directory where the package.json file is
npm install
- in the directory
npm start
- How to create a RESTful crud api using Nodejs?
http://localhost:5000/api/users -> Method: Get | all users
http://localhost:5000/api/users/id -> Method: Get | Single user
http://localhost:5000/api/users/id -> Method: Delete | Delete single user
http://localhost:5000/api/users/id -> Method: Post | Add user body param requires -> name,email,password
http://localhost:5000/api/users/id -> Method: Put | Update single user body params -> name or email or password