period | command | description |
---|---|---|
development | pnpm start:dev |
start server with auto reloading |
development | pnpm start |
start server without auto reloading |
development | pnpm start:debug |
start server with auto reloading and debugging |
development | pnpm format |
format source codes |
development | pnpm lint |
run eslint |
development | pnpm test |
run tests |
development | pnpm test:watch |
run tests with auto reloading |
deploy | pnpm compile |
compile executable source of plain node |
deploy | pnpm clean-compile |
cleanup, then compile executable source of plain node |
deploy | pnpm clean |
cleanup compiled dists |
production | pnpm start:prod |
start server |
Note the following points:
- The source codes are automatically formatted and linted before commit using husky.
- By default, development requires
pnpm
. pnpm start:prod
will not automatically compile the sources.- Controllers in
/src/controller
and services in/src/service
will be automatically loaded. As a consequence, those files cannot contain non-relevant function exports.
- create/find relevant services in
/src/service
- add service to
/src/app.module.ts
- create/modify relevant controller in
/src/controller
- add controller to
src/app.module.ts
- create exception in
/src/common/errors.ts
- create entity in
/src/entity
- generate migration with
pnpm db migration:generate --name <migration_name>
- change
IEnvironment
in/src/common/config.ts
- define schema according to compile errors
- nest.js
- TypeScript
- TypeORM database ORM with PostgreSQL database
- jsonwebtoken json web token
- pino logger
- envalid environment configuration loading
- Visual Studio Code integration
- husky git hooks
- unit & integration tests
- Docker support
- controller & service generation