Skip to content

neerajsonii/nestjs-mysql-codebase

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.

Installation

$ npm install

# install and configure husky
$ npm run prepare

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Swagger api-doc

api-doc - (http://localhost:3000/api-docs)

Migrations

# generate migration
$ npm run migration:generate -- --name=<file-name> 
(it will generate a migration file in `/src/app/database/migrations` folder 
 with name something like `timestamp-<filename>.js`)

# run migration
$ npm run migration:run
(it will run all the new migrations)

# undo latest migration
$ npm run migration:undo:latest
(it will undo the very latest migration in database)

# undo all migration
$ npm run migration:undo:all
(it will undo all the migrations in database)

Seeders

# generate seed
$ npm run seeds:generate -- --name=<file-name> 
(it will generate a seeds file in `/src/app/database/seeders` folder 
 with name something like `timestamp-<filename>.js`)

# run seeds
$ npm run seeds:run
(it will run all the new seeds)

# undo latest seeds
$ npm run seeds:undo:latest
(it will undo the very latest seed in database)

# undo all seeds
$ npm run seeds:undo:all
(it will undo all the seeds in database)

Lint

# fix lints
$ npm run lint:fix
(it will fix all the lints as per rules in `tslint.json` you can add or modify the rules accordingly)

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

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