A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ pnpm install
This repo comes with Prisma as the ORM layer and a database in Docker compose.
Create a .env
file at the root of the project with:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/sample_dev?schema=public
# start database
$ docker-compose up -d
# generate prisma types from the schema.prisma
$ pnpm run prisma generate
# apply the changes from the schema.prisma to the database (dev)
$ pnpm run prisma db push
# seed some users from the prisma/seed.ts file
$ pnpm run prisma db seed
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
Now you can visit http://localhost:3000/users
# unit tests
$ pnpm run test
# e2e tests
$ pnpm run test:e2e
# test coverage
$ pnpm run test:cov
# the following will create a migration file for changes in the schema.prisma
$ pnpm run prisma migrate dev
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.