A fork of the Nest framework TypeScript boilerplate by Jenyus with PassportJS authentication, GraphQL and OpenAPI docs integrations using MikroORM.
- Uses code-first GraphQL
- Uses MikroORM for entities and migrations
- Implements refresh token based auth flow
- Uses PassportJS and JWT for authentication
- Custom Prettier and ESLint config
- Uses
@jenyus-org/nestjs-graphql-utils
to optimize queries and solve the N+1 problem
.env
JWT_KEY=<your-jwt-key-here>
ormconfig.js
const { join } = require("path");
module.exports = {
type: "sqlite",
synchronize: true,
entities: ["dist/**/*.entity.js"],
database: "tmp/data.sqlite",
migrations: [join(__dirname, "database", "migrations", "*.ts")],
cli: {
migrationsDir: "src/database/migrations",
},
};
$ yarn
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov
This boilerplate remains true to Nest and is MIT licensed.