Check out the link to read the published article
$ npm install
$ npm start
- GET
/
Check restaurant status
- POST
/order
withJSON
body
Request body
{
"dish": "Chicken Al-faham",
"qty": 2
}
Response body
{
"done": true,
"order": "22",
"message": "Your order will be ready in a while"
}
- GET
/order/:id
where:id
is the orderId
Example
http://localhost:5000/order/22
Response body When the job is running:
{
"progress": "Your order is ⏲ 32.5% ready",
"order": {
"dish": "Pork ribs",
"qty": 8
},
"status": "created"
}
When the job is finished:
{
"progress": "Your order is ready 😊",
"order": {
"dish": "Pork ribs",
"qty": 8
}
}
- POST
/order-legacy
withJSON
body
Request body
{
"dish": "Tacos",
"qty": 4
}
Response body
{
"done": true,
"message": "Your 4x Tacos is ready"
}