hakkuns / nest-prisma-rest-api-boilerplate

Nest + Prisma + TypeScript | REST API Starter repository

Home Page:https://7code.ro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

https://7code.ro


Languages

Language:TypeScript 95.4%Language:JavaScript 3.3%Language:Shell 1.3%