Prisma is an open-source ORM for Node.js and TypeScript. It is a next-generation node.js and typescript ORM. It is used as an alternative to writing plain SQL or using another database access tool such as SQL query builders.
While Prisma can be used with plain JavaScript, it embraces TypeScript and provides a level to type safety that goes beyond the guarantees of other ORMs in the TypeScript ecosystem. You can find an in-depth comparison of the type-safety guarantees of Prisma and Type ORM here.
Getting started:
In this article, you’ll learn how to get started with NestJS and Prisma. You are going to build a sample NestJS application with a REST API that can read and write data in a database.
Create your NestJS Project
Step 1: Install the NestJS project
nest new <project name>
Step 2: Setup Prisma
yarn add prisma –dev
yarn prisma
yarn prisma init
Step 3: Set the database connection


Note: Create a model for prisma migrate
yarn prisma migrate dev –name init
yarn add @prisma/client
yarn prisma generate
Step 4: Set up Prisma module and service inside the src folder
nest g service prisma

nest g module prisma

If you want to learn more about Prisma click here