A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
NestJS Framework server project generated from official JHipster NodeJS blueprint.
$ npm install
For prod database configuration, in src/orm.config.ts change your url connection:
if(process.env.NODE_ENV==='prod'){
ormconfig = {
...
url: 'YOUR CONNECTION URL',
logging: false,
synchronize: commonConf.SYNCRONIZE,
entities: commonConf.ENTITIES,
migrations: commonConf.MIGRATIONS,
cli: commonConf.CLI,
migrationsRun: commonConf.MIGRATIONS_RUN,
};
}
According typeORM migration guide, there are under src/migrations/ the scripts to create the database schema and after to insert data seed. The scripts are automatically run in the first start up, and after anymore.
# development
$ npm run start
# watch mode
$ npm run start:dev
# build and run in production mode
$ set NODE_ENV=prod&& npm run build && npm run start:prod
# run production build with node
$ set NODE_ENV=prod&& node dist/main.js
# build production bundle with webpack
$ npm run webpack:prod
# run production bundle with node (not require node_modules folder)
$ node dist/bundle.js
You can specify dev or prod NODE_ENV value (default is dev as indicated in .env) The webpack build bundle automatically is configured for prod env, and can run without node_modules
# run lint
$ npm run lint
# fix lint issues
$ npm run lint:fix
# run this and after you can execute debug task in VSCode
$ npm run start:debug
# unit tests
$ npm run test
# lint
$ npm run lint
# fix lint issues
$ npm run lint:fix
# test coverage of unit tests
$ npm run test:cov
# e2e tests with full app coverage report
$ npm run test:e2e
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.
- Community - jhipster homepage
- Stream Lead - Angelo Manganiello
- Website And Guide - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.