megatunger / nestjs-react-boilerplate

NestJS boilerplate. Auth, TypeORM, Postgres, Docker. React, Webpack, Monorepo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest framework TypeScript starter repository.

Installation

# npm 8 or higher
# node 16 or higher

$ npm install

HUSKY for linting staged files

$ npm run husky
$ npm run lint:fix

Database

$ docker-compose --version (must be 2.7.0)
$ docker-compose up db -d
$ docker-compose exec db bash
$ psql -U postgres -d projectz

psql commands docker cleanup

Migrations

# run migrations
$ npm run migration:run

# generate migrations
$ npm run migration:generate

# revert migrations
$ npm run migration:revert

if you get error on migrations try deleting dist folder, remove db container and volume

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

License

Nest is MIT licensed.

About

NestJS boilerplate. Auth, TypeORM, Postgres, Docker. React, Webpack, Monorepo


Languages

Language:TypeScript 87.6%Language:JavaScript 9.9%Language:Dockerfile 1.2%Language:HTML 0.8%Language:Shell 0.4%