Skip to content
/ nestjs-template Public template

NestJS Template with PNPM, Fastify, Docker, Prisma, SWC, BiomeJS and Configify.

License

Notifications You must be signed in to change notification settings

solufyapp/nestjs-template

Repository files navigation

Nest Logo

NestJS Template

Pnpm Fastify Docker Prisma Swc Biome Configify

Features

  • 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.

Requirements

Installation

  1. Clone the repository:

    git clone https://github.com/solufyapp/nestjs-template.git
    cd nestjs-template
  2. Set up environment variables:

    Copy the .env.example file to .env.

    cp .env.example .env

    Edit the .env file with your own configuration.

  3. Install dependencies:

    pnpm install

Running the app

# development
pnpm start

# watch mode
pnpm start:dev

# production mode
pnpm start:prod

Linting and formatting

# format only
pnpm format

# lint, format and organize imports
pnpm lint

# lint without fixing
pnpm lint:ci

# lint staged files only
pnpm lint:staged

Contributing

Feel free to contribute with suggestions or bug reports at the template reposity.

Authors