Skip to content

ontid-team/ontid-server-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skeleton

code style: prettier Commitizen friendly Conventional Commits

Installation

Development environment requirements:

Before starting - dev stage

$ cp .env.example .env
$ npm run start:dev

Before starting - prod stage

$ cp .env.example .env
$ npm run start:prod

Run a migration

$ npm run migration:run

Сreating a migration

$ npm run migrate:create --name=<NAME>

Project Structure

Name Description
src/ Source files
src/config/ Application configuration
src/core/ Reusable utilises and library source code like a logger
src/db/ DB connect and migration
src/middleware/ Express Middlewares like error handler feature
src/modules/ Express Middlewares like error handler feature
src/providers/ Express Middlewares like error handler feature
src/utils/ Express Middlewares like error handler feature
src/utils/helpers/ Express Middlewares like error handler feature
build/ Compiled source files will be placed here
tests/ Test cases will be placed here
tests/unit/ Unit Test cases will be placed here
tests/integration/ API routes (Integration) Test cases will be placed here

Notes

1. PullRequest (PR)

  • This PR implements new feature, fix bug, or some other changes
  • If PR is not ready to review mark it as Draft
  • All commits in this PR should be by conventional-commits
  • Title of the PR should have issue(s) identifier(s) ("BOX-123 Example title of PR")

1. Why is my git pre-commit hook not executable by default?

  • Because files are not executable by default; they must be set to be executable.
chmod ug+x .husky/*
chmod ug+x .git/hooks/*
  • Don’t use deprecated or vulnerable versions of Express
  • Use TLS
  • Use Helmet
  • Use cookies securely
  • Prevent brute-force attacks against authorization
  • Ensure your dependencies are secure
  • Avoid other known vulnerabilities
  • Additional considerations