Skip to content

winner106/nest-prisma-rest-api-boilerplate

 
 

Repository files navigation

7Code Logo

Description

Nest + Prisma + TypeScript starter repository.

Production-ready REST API:

  • Error Handling (Exception Filters)
  • Logging System
  • DB Seeds/Migrations
  • Built-in AuthModule, using JWT. Route Guards
  • Model Events Listener (onCreated, …)
  • Deployable. CI/CD pipeline using Github Actions.
  • Advanced ESLint/TSLint config. (e.g: auto-fix will remove unused imports)
  • Shared services/constants/helpers
  • Middlewares/Interceptors implementation example.

TO-DO

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Prisma (ORM)

# IDE for your database
$ npx prisma studio 

# run migrations (apply schema changes)
$ npx prisma migrate dev

# run migrations on CI/CD
$ npx prisma migrate deploy

# apply db schema changes to the prisma client
$ npx prisma generate

Code Style

Sync your IDE with project eslintrc.js.

Check Run ESLint --fix on save

Stay in touch

License

MIT licensed.

About

Nest + Prisma + TypeScript | REST API Starter repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.4%
  • JavaScript 3.3%
  • Shell 1.3%