This is an API based on a Cab Booking Service which can be used by anyone and everyone..
The API consists of a databse of the drivers available in the world and based on your location(longitudes,latitiudes) calculates the driver closest to you.
This API is written in Node.Js, Express.Js, Mongoose.Js and MongoDB
Firstly Clone the repository in your computer and open the command line in the folder.
Then run npm install
to install all the dependencies
Run npm run start
in the Project Directory
Open localhost:3000/api/driver
with a POST Request with the Driver Details as shown in the Driver Model enclosed in a JSON Object
Open localhost:3000/api/driver/{driver id}
with a PUT Request with the Driver Details as shown in the Driver Model enclosed in a JSON Object
Open localhost:3000/api/driver/{driver id}
with a DELETE Request with the Driver ID enclosed in a JSON Object
Open localhost:3000/api/drivers?lng={longitude}&lat={latitude}
with a GET Request with the Latitude and Longitude of your location int the Request