1
0
Fork 0
nodejs-backend-template/README.md

2.5 KiB

backend-template (Node.js)

List of contents

Technologies used

Technology name Link
Node.js Website
PostgreSQL Website

List of libraries used

Library name Purpose Link
bluebird for parallel asynchronous operations await Promise.all([]) Website
camelcase for parsing filenames Website
decamelize for parsing filenames Website
dotenv for environment variables Website
express framework of the entire application for the API Website
cors for corses Website
morgan for logging requests Website
log4js for logging requests Website
chalk for logging requests Website
pg to work with the database Website
pg-hstore to work with the database Website
sequelize as an ORM for working with the database Website
sequelize-auto-migrations for automatic creation of migrations from ORM models Website
sequelize-cli for database operations Website
ws to work with the web socket Website
joi for validation Website

How to use

List of contents

Pre commit hook

Copy the .scripts/pre-commit file to the .git/hooks/ folder to automatically fill in the build.json file before the commit.

Run application

  1. Copy .env.example, change its name to .env, and populate the file according to your environment;
  2. Run the command:
npm i

to set dependencies; 3. Run the command:

npm run db:migrate:create
  1. Run the command:
npm run db:seed
  1. Execute the command:
npm run start

to run the application.