Project developed in the Back-end Module at the Trybe course.
This project goal was developt a RESTful API to manage sales with the MSC software architecture and test it. The API presents all the CRUD operations. The tests were made with Mocha, Chai and Sinon.
Feature | Route |
---|---|
List all products | GET /products |
Register and validate product | POST /products |
Update product | PUT /products/:id |
Delete product | DELETE /products/:id |
Search for title or content using a query string | GET /products/search |
List all sales | GET /sales |
Register and validate sales | POST /sales |
Update sale | PUT /sales/:id |
Delete sale | DELETE /sales/:id |
Access the route /api-docs
to see the documentation.
Ex.: http://localhost:3000/api-docs
🛠️ Used tools:
Download the code:
git clone [email protected]:queite/store-manager.git
Enter the root folder:
cd store-manager
Install dependencies:
npm install
Run database service on docker:
docker compose up -d db
Start the API:
npm start
All Trybe projects use linters
, Git
and GitHub
.