/UserCrudApi

Primary LanguageJavaScript

Instruction to run this file

  • It is a RESTfull API

  • There are 6 routes

  • To start server, use npm start or npm run dev(nodemon).nodemon automatically restarting the node application when file changes in the directory.

1. create a user

  • Method POST http://localhost:5000/api/createUser { "name":"kanha", "email":"kanhu.shoo0@gmail.com", "mobile":"9556966276", "address":{"street":"vanibihar", "locality":"bbsr", "city":"bbsr", "state":"odisha", "pincode":"752063", "coordinatesType":{"type":"point", "coordinates":[22.46, 82.98]}} }

2. Get all users

3. Update user

4. Delete user

5. Short users By Created Date

6. Get all users sorted by their distance from coordinates