Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rufat/orderdelivery

An order delivery back-end source code.
https://github.com/rufat/orderdelivery

api async await delivery experiment expressjs google-maps latitude longitude nodejs order

Last synced: 24 days ago
JSON representation

An order delivery back-end source code.

Awesome Lists containing this project

README

        

Usage
-------------
**Note:** If you're using *Ubuntu*, run the "start.sh" shell script. If not, you have to install the MongoDB, NodeJS and NPM manually.
1. Use your [Google Distance Matrix](https://cloud.google.com/maps-platform/routes/) API key and put into config.json.
2. Run MongoDB: `npm run db`
3. Run ExpressJS server: `npm start`
4. Run unit testing: `npm test`

API
-------------
`/order` **[POST]**
**Description:** Place an order.
**Body (JSON):**

{
origin: ["", "longitude"],
destination: ["", ""]
}

`/order/:orderId` **[PUT]**
**Description:** Take order.
**Body (JSON):**

{
status:
}

`/orders` **[GET]**
**Description:** Listing all the orders. Pagination supported.
**Query:**

?page=&limit=