A very simple API created using TypeScript, MongoDB and RabbitMQ
- Save Item (takes an Item in Request Body)
- Get Item (By ID)
- List Items (Get All Items from DB)
- Delete Item (Delete from DB by ID)
- Order Item (Mark Item as SOLD, by ID)
assuming you are already in Workshop folder, open terminal from there,
then type :
docker-compose up
docker-compose will simply get instructions from docker-compose.yml
, which has three images
- Mongodb.
- RabbitMQ.
- backend app.
Please import the file postman.json to your postman, to navigate through various templates for requests.
Update Item, first check item status, if proper it marks it as sold and send message to ItemChanged Queue, you can check those messages via
http://localhost:15672/#/
use guest/guest to log in.
- Add JOI validation.
- Add Auto Generated Swagger doc.
- Service layer to be added, instead of handling everything in controller.
- RabbitMQ Helper Class to be added.
- Postman Runner and Tests for a full scenario test
Created Specially for Alten End 2 End With TypeScript workshop
Good Ref. Synaptiklabs.