A1exander-liU / nestjs-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NestJS Starter Template

Description

Nest framework TypeScript starter repository with:

  • Authentication with JWT
  • Route guarding based on authentication status and roles
  • Database connection using Prisma

Installation

$ npm install

Database

  1. Create .env file in project root
  2. Follow .env.template for required variables
  3. You can update your db provider here (Providers)
// From Project Root: prisma/schema.prisma
datasource db {
  provider  = "postgresql"
  url       = env("DATABASE_URL")
}

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

About


Languages

Language:TypeScript 93.6%Language:JavaScript 6.4%