It's a API to register products and sales, having an structure that makes two MongoDB collections work together and having a tool has in MySQL, the triggers, creating a trigger w/JS+NODEJS, making when some sale has made, the quantity of the products has solded suffer decrement.
- Structure a Rest API with MSC arch
- Validate request body and params w/express
- Construct unit tests with mocha, chai and sinon
- /products -> POST -> Register new products;
- /products -> GET -> Find all products;
- /products/:id -> GET -> Find certain product;
- /products/:id -> PUT -> Uptade some product;
- /products/:id -> DELETE -> Delete some product;
- /sales -> POST -> Register new sale;
- /sales -> GET -> Find all sale;
- /sales/:id -> GET -> Find certain sale;
- /sales/:id -> PUT -> Uptade some sale;
- /sale/:id -> DELETE -> Delete some sale;