A progressive Node.js framework for building efficient and scalable server-side applications.
NestJs-Authentication starter.
- MySQL is the world's most popular open source database.
- Node is a JavaScript runtime built on Chrome's V8 JavaScript engine.
- vscode is a Text Editor
- Clone the repository
git clone <repo> - Cd into the project root directory
- Load the code into vscode
- Install the app
- Create Database schema in either MySQL, Postgres or MongoDb
- Create .env and .env.testing files in the project root folder
- This step is optional. Modify the database settings in
app.module.ts. For instance, you could change type value in the config property to either postgres or mysql
.env and .env.testing should contain the variables below.
Make sure there is no space after the values of each variables
NODE_ENV=
PORT=
HOST=
DATABASE_NAME=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_PORT=
APP_SECRET=
APP_JWT_EXPIRATION=
Database module config example in app.module.ts
DatabaseModule.forRoot({
config: {
databaseType: 'relational' || 'document',
type: 'mysql' || 'postgres' || 'mongodb',
orm: 'typeorm' || 'sequelize' || '',
},
useClass: ConfigService,
}),
...
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covNest 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.
- Author - Babatunde Ogedengbe
- LinkedIn - Profile
Nest is MIT licensed.