- 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)
- 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.examplefile to.env.cp .env.example .env
Edit the
.envfile 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:stagedFeel free to contribute with suggestions or bug reports at the template reposity.