NestJS starter project. Uses Postgres and Prisma ORM.
This project requires Node 22.14. If you do not have it, the easiest option is to install nvm.
Run the following commands or just the ./setup.sh
that will do this automatically (and will also install nvm
if it's missing).
# Install the correct Node version
nvm install
# Install the correct pnpm version
corepack enable pnpm
corepack up
# Install dependencies
pnpm install
cp .env.example .env
# Start DB
docker compose up -d
# Prepare Prisma
pnpm exec prisma migrate dev
pnpm exec prisma generate
pnpm exec prisma db seed
pnpm run dev
# Unit tests in watch mode
pnpm run test
# Test coverage
pnpm run test:cov
pnpm run lint
pnpm run format
You should NEVER use this to run locally. This is only for testing the Docker image.
docker build -t nestjs-starter . --no-cache
docker run \
-p 3000:3000 \
-e DATABASE_URL="postgresql://postgres:[email protected]:5432/nestjs_starter?schema=starter" \
nestjs-starter