To start application run npm run start:dev
- Routes are being generated automatically from folder
src/routes. - Custom error handler with error codes, statuses and messages (src/utils/error-hanlder).
- Request validator middleware.
- Alias configuration. Example:
require('#utils')instead ofrequire('../../../../utils'). Configuration is located inpackage.json/_moduleAliases. - Husky pre-commit linting stage.
- Git-cz + cz-emoji configuration. Simply run
npm run committo commit all unstaged files.
src
├── config
│ └── ...
├── middlewares
│ └── ...
├── routes
│ └── v1 // API Version
│ ├── bots
│ │ ├── get.js // HTTP GET controller => GET ../v1/bots
│ │ ├── post.js // HTTP POST controller => POST ../v1/bots
│ │ ├── router.js // Current route endpoint declaration
│ │ ├── schemas.js // Validation schemas
│ │ └── {{id}} // Analogue of Express.js path parameters declaration ../v1/bots/:id
│ │ ├── get.js // Example: GET ../v1/bots/1337
│ │ └── router.js
└── utils
└── ...