Skip to content

vineet-suri/nestJs-starter

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.

NPM Version Package License NPM Downloads Travis Linux Coverage Gitter Backers on Open Collective Sponsors on Open Collective

Description

Nest framework TypeScript starter repository. This setup has jwt strategy provider, cache(redis) module, audit log module, DB migrations, soft delete & user modifiable entity, env setup and code to dynamically generate orm config from env. Basic configuration steps are given as following.

Installation

$ yarn

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Migrations

# Folder setup
Create migrations folder under src folder. Create seeds folder within migrations folder.

# create migration file based on model changes
$ yarn typeorm migration:generate -n <FileName>

# run databse migration
$ yarn typeorm migration:run

# run migration for seeding data
$ yarn typeorm migration:run -c seed

Steps to start application

# clone the application source code.

# install yarn from npm using global modifier.
$ npm i yarn -g

# install all the dependencies (node_modules) inside the project dir.
$ yarn install

# this command is to build the app
$ yarn build

# this command is to run all the migrations into the db.
$ yarn typeorm migration:run

# this command is to pre fill the db with pre-requisite data.
$ yarn typeorm migration:run -c seed

# finally, start the app
$ yarn start

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published