A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
Nest framework TypeScript starter repository.
Main differences of nestjs/typescript-starter:
- TypeScript Path Aliases configured
- You can make imports like
import { ... } from '@app/...;
- You can add your own aliases
- Aliases configuration in the one place tsconfig.json.
- Jest &
module-alias
importspaths
config using ts-paths-fix
- You can make imports like
- Yarn for packages installation and
check-yarn
utility to prevent packages installation vianpm
- Additional Jest matchers from
jest-extended
configured - ESLint for linting JS & TS files (TSLint is deprecated in 2019).
- Very strict linting config (airbnb + unicorn + some other plugins)
.nvmrc
- Git hooks via husky
- Utility to automatically pull updates from this template repository (
npm run tpl-repo:merge
)
Other features:
- Wallaby JS works out of the box without any additional config
Notice: How to run in "Without Configuration" mode (Official Wallaby JS Guide)
-
Clone as is
git clone git@github.com:korniychuk/nestjs-starter.git
cd nestjs-starter
yarn
-
Fork
- Click Fork git button
git clone git@github.com:YOUR_GIT_NAME/nestjs-starter.git
cd nestjs-starter
yarn
-
Creating from template
-
Using with already cloned repository as an additional origin for pulling updates
-
Automatically
npm run merge-tpl-repo
-
Manually
git remote add template git@github.com:korniychuk/nestjs-starter.git
git fetch template
git merge --allow-unrelated-histories template/master
-
-
Install NVM
-
Use
.nvmrc
file one of the next ways:- Execute
nvm use
in the project root directory - Install NVM Loader and your .nvmrc will be loaded automatically when you open the terminal.
- Execute
# development
$ npm run start
# watch mode
$ npm run start:dev
# debug mode
$ npm run start:debug
# production mode
$ npm run build:prod
$ npm run start:prod
# unit tests
$ npm run test
# watch mode
$ npm run test:watch
# specific tests
npm run test -- src/my.spec.ts
npm run test:watch -- src/my.spec.ts
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
# Just show problems
$ npm run lint
# Fix problems if it is possible
$ npm run lint:fix
Anton Korniychuk |
---|