Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ npm install

Set Values to .env (if dont use docker to run app)

# copy .env.default and rename the copy to .env
$ cp .env.default .env

# change values inside .env
REDIS=
NODE_ENV=
PG_HOST=
PG_PORT=
PG_USERNAME=
PG_PASSWORD=
SECRET_JWT=

Running the app

# copy .env.default and rename the copy to .env
$ cp .env.default .env

# change values inside .env

REDIS=
NODE_ENV=
PG_HOST=
PG_PORT=
PG_USERNAME=
PG_PASSWORD=
SECRET_JWT=


# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Running the app with docker

# build images
$ docker-compose build

# after build images run docker app
$ docker-compose up -d

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Database Migrations

# Create migration
$ npm run migration:create --name=CreateTableUser

# Run migrations
$ npm run migration:run

# Revert migrations
$ npm run migration:revert

Database Entity

# Create Entity
$ npm run entity:create --name=User

Support

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.

Stay in touch

License

Nest is MIT licensed.