Git Product home page Git Product logo

iostock-api's Introduction

iOStock-API

An API for authenticating users, registering and listing products and registering and listing inventory movements. Developed in NodeJS.

Instalação:

It is important that when cloning the application, execute the command "npm i" to install all project dependencies listed in the package.json file.

For the database to function normally, it is important that the following steps are followed:

1 - Create a MySQL database on your machine with the name "io_stock".

2 - Enter the directory "src" and the folder "database", with that, you will find a file called db.js.

3 - In line 3 of the file, replace the words "root" with your MySQL user and the numbers "1117" with your MySQL password.

4 - Now go to the "models" folder in the "src" directory.

5 - Access the "Product.js", "StockMove.js" and "User.js" files.

6 - In these files you will find a commented line like this: "//Product.sync({force: true});" , it is important that in the first execution of the program this line is uncommented so that it creates the corresponding table in its database. After the first execution of the program, the line be commented so that it will not be executed again, otherwise the database will recreate all tables at each execution! Remembering that these lines of code that execute this command are found in all files in the "models" folder and it is important that this step is completed on all these files.

7 - With that, the database will be ready for use and in perfect working order.

Execução

To start the API, just run the command "yarn dev".

StockAPI

iostock-api's People

Contributors

vitorromanelli 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.