This project is a boilerplate/setup of a Web API to be consumed by any Web Client like: Angular, React, Vue, etc... applications and can be integrated with any database.
- Node.js >= 10.x
Install the dependencies and devDependencies and start the server.
$ git clone https://github.com/icarotav/product-stock-api.git
$ cd product-stock-api
$ npm install
$ npm run dev
For production environments...
$ npm start
To build this project I used most used techs, text editor and packages from npm:
- Node.js
- Visual Studio Code- Awesome text editor with this plugins installed: DotENV, ESLint, GitLens, Mocha Test Explorer (automatically installs Test Explorer UI), npm Intellisense and vscode-icons.
- Express - Fast, unopinionated, minimalist web framework for node.
- PM2 - Advanced, production process manager for Node.js
- Sequelize - Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.
- Mocha and Chai - As test framework.
- ESLint - ESLint to padronize the javascript code.
- Modularized components
- Easy to create new middlewares and apply in the server.
- API handling all errors even if is not handled by developer like when omit .catch on Promises.
- Code padronized by ESLint