Note: If you're using Ubuntu, run the "start.sh" shell script. If not, you have to install the MongoDB, NodeJS and NPM manually.
- Use your Google Distance Matrix API key and put into config.json.
- Run MongoDB:
npm run db
- Run ExpressJS server:
npm start
- Run unit testing:
npm test
/order
[POST]
Description: Place an order.
Body (JSON):
{
origin: ["<latitude>", "longitude"],
destination: ["<latitude>", "<longitude>"]
}
/order/:orderId
[PUT]
Description: Take order.
Body (JSON):
{
status: <status>
}
/orders
[GET]
Description: Listing all the orders. Pagination supported.
Query:
?page=<int>&limit=<int>