Prisma
prisma.io โบ home โบ nestjs โบ nestjs โบ nestjs
How to use Prisma ORM and Prisma Postgres with NestJS | Prisma Documentation
IntroductionQuick startPrerequisites1. Create your NestJS project2. Set up Prisma2.1. Install Prisma and dependencies2.2. Initialize Prisma2.3. Set the generator output path2.4. Configure your database connection2.5. Define your data model2.6. Create and run your migration2.7.
NestJS Postgres Prisma Tutorial #1 - Getting Setup - YouTube
01:43:56
NestJS & Prisma Tutorial - YouTube
25:59
NestJS Prisma Tutorial - YouTube
NestJS + Prisma Deep Dive
51:42
NestJS + Prisma Deep Dive - YouTube
Nest.js REST API with Prisma ORM, Neon Postgres - YouTube
LogRocket
blog.logrocket.com โบ home โบ how to use nestjs with prisma
How to use NestJS with Prisma - LogRocket Blog
June 4, 2024 - With the Prisma service set up, generate a todo module for all the todo logic with the command below: ... import { Injectable } from '@nestjs/common'; import { PrismaService } from '../../prisma.service'; import { Todo, Prisma } from '@prisma/client'; @Injectable() export class TodoService { constructor(private prisma: PrismaService) {} async getAllTodo(): Promise<Todo[]> { return this.prisma.todo.findMany(); } async getTodo(id: number): Promise<Todo | null> { return this.prisma.todo.findUnique({ where: { id: Number(id) } }); } async createTodo(data: Todo): Promise<Todo> { return this.prisma.todo.create({ data, }); } async updateTodo(id: number): Promise<Todo> { return this.prisma.todo.update({ where: { id: Number(id) }, data: { completed: true }, }); } async deleteTodo(id: number): Promise<Todo> { return this.prisma.todo.delete({ where: { id: Number(id) }, }); } }
Prisma
prisma.io โบ blog โบ nestjs-prisma-rest-api-7D056s1BmOL0
Build a REST API with NestJS, Prisma 7, PostgreSQL and Swagger
June 3, 2022 - Learn how to build a backend REST API with NestJS, Prisma ORM 7, PostgreSQL and Swagger. Set up the project, model your data, build the API and document it with Swagger. Fully updated for Prisma 7 and NestJS 11.
npm
npmjs.com โบ package โบ nestjs-prisma
nestjs-prisma - npm
January 7, 2026 - Library and schematics to add Prisma integration to a NestJS application. Latest version: 0.27.0, last published: 7 months ago. Start using nestjs-prisma in your project by running `npm i nestjs-prisma`. There are 9 other projects in the npm registry using nestjs-prisma.
ยป npm install nestjs-prisma
Published ย Jan 07, 2026
Version ย 0.27.0
Tomray
tomray.dev โบ nestjs-prisma
Ultimate Guide: How to use Prisma with NestJS - Tom Ray
November 29, 2022 - Now, the above example is super simple, but hopefully, you get the idea. Here are a few ideas on how you can take this further: ... [Advanced] Add an auth layer so the userId can be passed in automatically instead of passed into the body of the request ยท Let's now see how we can work with GraphQL in a NestJS app with Prisma...
GitHub
github.com โบ notiz-dev โบ nestjs-prisma-starter
GitHub - notiz-dev/nestjs-prisma-starter: Starter template for NestJS ๐ป includes GraphQL with Prisma Client, Passport-JWT authentication, Swagger Api and Docker
# for example docker build -t nest-prisma-server . After Docker build your docker image you are ready to start up a docker container running the nest server: docker run -d -t -p 3000:3000 --env-file .env nest-prisma-server ยท Now open up ...
Starred by 2.5K users
Forked by 366 users
Languages ย TypeScript 96.7% | JavaScript 1.8% | Dockerfile 1.3% | Shell 0.2%
GitHub
gist.github.com โบ EdouardDem โบ 5aa7ed56117aed79f43914583474d4ae
nestjs-prisma-example-tutorial ยท GitHub
To initialize Prisma, execute the following command in your terminal: ... In this step, you'll create a PostgreSQL database. We'll use Docker to run a PostgreSQL container. If you already have a PostgreSQL database installed on your computer, feel free to skip this step. Execute the following command in your terminal to create a PostgreSQL container: docker run --name nestjs-prisma-demo -e POSTGRES_PASSWORD=passwd -e POSTGRES_USER=user -e POSTGRES_DB=demo -p 5432:5432 -d postgres
nestjs-prisma
nestjs-prisma.dev
nestjs-prisma
One command to automate the Prisma setup in your NestJS application.
Medium
medium.com โบ yavar โบ how-to-implement-nestjs-with-prisma-e682ed83f286
How to implement NestJS with Prisma | by Gnanabillian | YavarTechWorks | Medium
October 3, 2022 - NestJS is a framework for creating scalable, server-side Node.js applications. It uses modern JavaScript, fully supports and is built using TypeScript, and combines elements of object-oriented, functional, and functional reactive programming. This post will demonstrate how to use Nest and Prisma to build a REST API.
DEV Community
dev.to โบ nadim_ch0wdhury โบ how-to-use-nest-js-with-prisma-52c0
How to use Nest JS with Prisma? - DEV Community
February 6, 2025 - Prisma Service: Create src/prisma/prisma.service.ts: import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { PrismaClient } from '@prisma/client'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { async onModuleInit() { await this.$connect(); } async onModuleDestroy() { await this.$disconnect(); } }
Medium
medium.com โบ @hrynkevych โบ prisma-orm-and-postgresql-with-nestjs-bf0a551fcaff
Prisma ORM and PostgreSQL with NestJS | by Mykhailo (Michael) Hrynkevych | Medium
August 30, 2024 - To integrate Prisma ORM and PostgreSQL into a NestJS project, follow these steps: ... Edit the prisma/schema.prisma file to define your database schema. Hereโs an example schema with a User model:
Medium
medium.com โบ @msmiraj8 โบ get-started-with-prisma-7-with-nest-js-mysql-3919eaa7c760
Get Started With Prisma 7 with Nest Js & MySQL | by Mustak Sahariar | Medium
November 25, 2025 - import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { PrismaClient } from '../src/generated/prisma/client'; import { PrismaMariaDb } from '@prisma/adapter-mariadb'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { constructor() { const adapter = new PrismaMariaDb(process.env.DATABASE_URL!); super({ adapter, log: ['info', 'warn', 'error'] }); } async onModuleInit() { try { await this.$connect(); await this.$queryRaw`SELECT 1`; console.log('โ
Prisma connected to MySQL'); } catch (error) { console.error('โ Prisma connection error:', error); throw error; } } async onModuleDestroy() { await this.$disconnect(); console.log('๐ Prisma disconnected from MySQL'); } }
npm
npmjs.com โบ package โบ @nestjs-mod โบ prisma
nestjs-mod/prisma
An example of access to module services with forFeature. import { InjectPrismaClient, PrismaModule } from '@nestjs-mod/prisma'; import { NestFactory } from '@nestjs/core'; import { randomUUID } from 'crypto'; import { Injectable, Module } from '@nestjs/common'; import { PrismaClient } from '@prisma/client'; @Injectable() export class FeatureService { constructor( @InjectPrismaClient() private readonly prismaService: PrismaClient ) {} async createUser({ externalUserId }: { externalUserId: string }) { return await this.prismaService.prismaUser.create({ data: { externalUserId } }); } async getUse
ยป npm install @nestjs-mod/prisma
Published ย Jun 16, 2025
Version ย 1.16.1
DEV Community
dev.to โบ alfism1 โบ build-complete-rest-api-feature-with-nest-js-using-prisma-and-postgresql-from-scratch-beginner-friendly-part-1-5b73
Build Complete REST API Feature with Nest JS (Using Prisma and Postgresql) from Scratch - Beginner-friendly - PART 1 - DEV Community
July 7, 2024 - Each endpoint above already implemented validation as well according to the DTO, for example: Registration input validation (DTO create-user.dto) ... Now let's jump to the user service. In the service, we'll create functions to interact with the database via Prisma and they'll represent each endpoint mentioned above. ... import { ConflictException, HttpException, Injectable } from '@nestjs/common'; import { User } from '@prisma/client'; import { PrismaService } from 'src/core/services/prisma.service'; import { CreateUserDto } from './dtos/create-user.dto'; import { hash } from 'bcrypt'; @Injectable() export class UsersService { constructor(private prisma: PrismaService) {} // async registerUser // async loginUser // async updateUser // async deleteUser }