/store-manager-api

E-commerce API built with Node, Express, MySQL, and Docker

Primary LanguageJavaScript

Store Manager API

API for an e-commerce store with product and sales endpoints.

  • Built with Node, Express, MySQL, and Docker
  • 100% unit test coverage with Mocha, Chai, and Sinnon
  • Model, Service, Controller architecture

To run locally clone the repository and run the following commands:

$ docker-compose up -d
$ docker exec -it store_manager bash
$ npm run migration
$ npm start
$ npm run test:mocha

Product methods:

Request Body format for PUT and POST:

{"name": "productx"}

Sales methods:

Request Body format for PUT and POST:

[
  {"productId": "1", "quantity": "3"}, 
  {"productId": "3", "quantity": "5"}
]