Assignment solution
// Steps to run:
- Installing all the node modules
- npm i express
- npm i body-parser
- npm i mongoose
- Run 'node app.js' on terminal
- Server will start on port 3000
- List Of API's supported:
- GET: route: /get-users route: /get-sorted-users route: /get-nearest-users/:latitude/:longitude
- POST: route: /add-user
- PUT: route: /update-user/:userNo
- DELETE route: /delete-user/:userNo
- For Testing of API's, we can use Postman. We can just send request to the API route along with data via Postman and test the REST API, while server is running locally.