Skip to content

Latest commit

 

History

History
81 lines (57 loc) · 1.59 KB

File metadata and controls

81 lines (57 loc) · 1.59 KB

Jenyus Logo

Description

A fork of the Nest framework TypeScript boilerplate by Jenyus with PassportJS authentication, GraphQL and OpenAPI docs integrations using MikroORM.

Setup

  • 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

Configuration Files

Environment Variables

.env

JWT_KEY=<your-jwt-key-here>

TypeORM

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",
  },
};

Installation

$ yarn

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

License

This boilerplate remains true to Nest and is MIT licensed.