/nestjs-starter-1

🚀 Nest framework starter

Primary LanguageTypeScript

NestJS starter

CI status

NestJS framework starter repository.

Technologies

Installation

yarn global add @nestjs/cli
yarn install

Running the app

# development
yarn run start

# watch mode
yarn run start:dev

# production mode
yarn run start:prod

Test

# unit tests
yarn run test

# e2e tests
yarn run test:e2e

# test coverage
yarn run test:cov

DB migration

# generate
yarn run migration:generate <name>

# show all migrations
yarn run migration:show

# run
yarn run migration:run

# dry run
yarn run schema:log

# revert
yarn run migration:revert

Documentation

yarn run doc

How would I set this up myself

# creating a new project
yarn global add @nestjs/cli
nest new nestjs-starter
cd nestjs-starter

# database access
yarn add @nestjs/typeorm typeorm
yarn add sqlite3 pg
yarn add pluralize
yarn add -D @types/pluralize

# graphql
yarn add @nestjs/graphql apollo-server-express graphql-tools graphql
yarn add type-graphql

# validation
yarn add class-validator

# serialization
yarn add class-transformer

# security
yarn add helmet
yarn add bcrypt
yarn add -D @types/bcrypt

# auth
yarn add @nestjs/passport passport
yarn add @nestjs/jwt passport-jwt
yarn add -D @types/passport-jwt
yarn add passport-mock-strategy

# performance
yarn add compression

# health check
yarn add @nestjs/terminus @godaddy/terminus

# linter
yarn add -D eslint
yarn add -D eslint-plugin-import
yarn add -D eslint-plugin-react eslint-plugin-react-hooks
yarn add -D eslint-plugin-jsx-a11y
yarn add -D eslint-config-airbnb
yarn add -D @typescript-eslint/parser @typescript-eslint/eslint-plugin

# formatter
yarn add -D eslint-config-prettier

# documentation
yarn add -D @compodoc/compodoc

# documentation openapi
yarn add @nestjs/swagger swagger-ui-express