Delivery calculator for calculates how much a user is expected to pay for a delivery within Lagos, Nigeria. The API is available at https://idris-delivery-calculator.herokuapp.com
- Run
yarn install
command to install dependency - Run
yarn dev
command to run development server - Run
yarn test
command to run test - Run
yarn build
command to build - Run
yarn start
command to run the build file
- Nodejs
- Express
- mocha & supertest
POST : ${URL}/api/deliver
The request body needs to be in JSON format and include the following properties:
type - either "express" or "regular" *required
pickAddress - String *required
dropAddress - String *required
example:
{
"type":"regular",
"pickAddress":"tinubu square lagos island",
"dropAddress":"24 hundry street yaba lagos"
}
If it is successful response will be sent with a status 200 and json with price:
{
"price":1500
}
otherwise it will return an error message with status code related to the error type: