/nestjs-starter

A NestJS starter project with Prisma ORM and JWT and refresh token authentication.

Primary LanguageTypeScript

NestJS Starter

A NestJS starter project with the following features:

  • CRUD operations with PrismaORM
  • Seeding
  • JWT and refresh token authentication
  • Swagger API docs
  • Dockerization

API Docs

⚠️ You first have to start the server, see Setup.

The API docs are available at http://localhost:8080/docs.

The JSON version is available at http://localhost:8080/docs-json. This can be useful for e.g Postman.

Setup

Development

Requirements

Steps

  1. Clone the repository
  2. Copy .env.example to .env
  3. Install the dependencies
    npm install
  4. Start the database
    docker-compose up -d db
  5. Setup the database and seed it with data
    npm run resetAndSeedDb:dev
  6. Start the server
    npm run start:dev