43a99b82dd | ||
---|---|---|
.scripts | ||
server | ||
.env.example | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.sequelizerc | ||
README.md | ||
app.js | ||
build.json | ||
package.json |
README.md
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
- Copy .env.example, change its name to .env, and populate the file according to your environment;
- Run the command:
npm i
to set dependencies; 3. Run the command:
npm run db:migrate:create
- Run the command:
npm run db:seed
- Execute the command:
npm run start
to run the application.