Skip to content

This is a CRUD API for a store manager. It is built using NodeJS, Express and MySQL. I have used the MSC(Models, Services, Controllers) architecture for this project and Docker for containerization. Development was done using TDD(Test Driven Development) and the tests were written using Mocha, chai and sinon.

Notifications You must be signed in to change notification settings

lucasdximenes/store-manager-api

Repository files navigation

Store Manager API

This is a CRUD API for a store manager. It is built using NodeJS, Express and MySQL. I have used the MSC(Models, Services, Controllers) architecture for this project and Docker for containerization. Development was done using TDD(Test Driven Development) and the tests were written using Mocha, chai and sinon.

You can Create, Read, Update and Delete products and sales records.


Built With

Authors


API Documentation

The swagger API documentation can be found here.

Documentation file .yaml can be found here.

Insomnia workspace can be found here.


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need to have the following installed on your machine:

Installing

To get the development environment running, you will need to clone the repository and run the following commands:

docker-compose up -d

This will start the MySQL container and the NodeJS container. The MySQL container will be running on port 3306 and the NodeJS container will be running on port 3000.

After the containers are running, you will need to connect to the bash of the NodeJS container:

docker exec -it store_manager bash

finally, you will need to install the dependencies:

npm install

Running the tests

To run the tests, you will need to connect to the bash of the NodeJS container:

docker exec -it store_manager bash

and then run the following command:

npm test

Running the API

To run the API, you will need to connect to the bash of the NodeJS container:

docker exec -it store_manager bash

and then run the following command:

npm start

or

npm run debug

About

This is a CRUD API for a store manager. It is built using NodeJS, Express and MySQL. I have used the MSC(Models, Services, Controllers) architecture for this project and Docker for containerization. Development was done using TDD(Test Driven Development) and the tests were written using Mocha, chai and sinon.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published