What is the goal? Bootstrapping without headache. A simple NodeJS skeleton.
nodemon is used for development.
Important
Works with NodeJS >= 14
- Copy
.template.envto.env - Adapt if needed the configuration in
.env - Install packages with
npm ci
For autoformatting in VSCode install the prettier extension.
// for development mode
npm run dev
// for normal startup
npm run startsrc/servershould contain all the web-server logicsrc/server/routesshould define all routerssrc/server/middlewarescontains all custom middlewares like exception handling, validation, etc.
src/handlersshould contain all the logic. Handlers act as a logical middleware betweenrouterandrepository( that's not a part of this repo )