Coder Social home page Coder Social logo

imvictorm / store-manager Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 284 KB

Store management RESTful API ๐Ÿ›๏ธ

JavaScript 97.96% Shell 2.04%
docker expressjs javascript joi-validation mocha-chai msc-architecture mysql2 nodejs restful-api sinonjs

store-manager's Introduction

Store Manager ๐Ÿ›๏ธ

Project Context ๐Ÿ’ก

This project is my first RESTful API made using the MSC (Model-Service-Controller) architecture. The API is a sales management system based on dropshipping where you can create, visualize, delete and update products and sales.

Acquired Knowledge ๐Ÿ“–

In this project, I was able to:

  • Learn and implement the MSC architecture;
  • Divide my code into layers following the MSC architecture;
  • Create unit tests for the model, service, and controller layers;
  • Test using Mocha, Chai, and Sinon;
  • Validate requests using Joi;
  • Create a RESTful API;
  • Connect the API to a MySQL database and use it;

Main Technologies used ๐Ÿงฐ

JavaScript Express Node.JS MySQL Mocha JS Chai JS Sinon JS Joi Docker
javascript express nodejs mysql mocha-js chai-js sinon-js joi docker

Running the application โš™๏ธ

  1. Clone and enter this repository
git clone [email protected]:ImVictorM/Store-Manager.git && cd Store-Manager
  1. Install the dependencies
npm install
  1. Get the containers running
docker-compose up -d
  1. Enter the server's container
docker exec -it store_manager bash
  1. Start the server
npm run start
---- or ----
npm run debug

Once the server is running, you must create and populate the database. To do this, open another terminal, enter the server's container (step 4) and type the following command:

npm run migration && npm run seed

Testing ๐Ÿ› ๏ธ

Note: for the tests to work correctly, the server must be running.

Running all tests:

npm test

store-manager's People

Contributors

imvictorm avatar trybe-tech-ops avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.