HTTP method | URL path | HTTP status code | Description |
---|---|---|---|
POST | api/v1/products/add | 200 | Create a new product |
GET | api/v1/products/all | 200 | Get all available products |
GET | api/v1/products/:id | 200 | Get a specific product via its id |
GET | api/v1/products/:id | 404 | Get product that can't be found |
GET | api/v1/category/all | 200 | Get all categories |
POST | api/v1/category/add | 200 | Add a new category |
DELETE | api/v1/category/:id | 200 | Delete a category |
DELETE | api/v1/category/:id | 404 | Can't delete category |
POST | api/v1/product-category/link | 200 | Add product to category |
POST | api/v1/product-category/link | 400 | Product already linked to category |
GET | api/v1/product-category/:id | 200 | Get products linked to category |
Must have yarn OR npm installed to run the project without issues
$ yarn install
# OR
$ npm run install
# development
$ yarn dev
# OR
$ npm run dev
- Add DTOs when needed