- PNPM: faster dependencies management than NPM.
- Fastify: faster http requests handling than Express.
- Docker: already dockerized (plus a docker compose to run PostgreSQL locally).
- Prisma: type-safety database ORM. (defaults to PostgreSQL)
- SWC: faster compiling times than Webpack.
- BiomeJS: faster linting and formatting than ESLint and Prettier.
- Configify: easy env variables management for NestJS. (compatible with class-validator)
- Husky: fast native git hooks.
- Premade CI workflow for Github.
- Using ESM modules.
-
Clone the repository:
git clone https://github.com/solufyapp/nestjs-template.git cd nestjs-template
-
Set up environment variables:
Copy the
.env.example
file to.env
.cp .env.example .env
Edit the
.env
file with your own configuration. -
Install dependencies:
pnpm install
# development
pnpm start
# watch mode
pnpm start:dev
# production mode
pnpm start:prod
# format only
pnpm format
# lint, format and organize imports
pnpm lint
# lint without fixing
pnpm lint:ci
# lint staged files only
pnpm lint:staged
Feel free to contribute with suggestions or bug reports at the template reposity.