DEV Community

Marc Stammerjohann for notiz.dev

Posted on • Originally published at notiz.dev on

Introducing NestJS Prisma Schematics

Until now, adding Prisma to a NestJS application requires a few manual steps - installing @prisma/cli and @prisma/client, creating a PrismaService and (eventually) adding a Dockerfile.

I am excited to release nestjs-prisma - a set of schematics to perform all steps necessary to add Prisma to your NestJS application automatically.

All you need to do is run the following command in your Nest app:

nest add nestjs-prisma

Schematics in action

Do you need more options? I got you covered, you can go a step further and specify a Prisma version if you like:

nest add nestjs-prisma --prismaVersion 2.4.1

Or go crazy by adding a Dockerfile for your Nest app and a docker-compose.yaml with a PostgreSQL database.

nest add nestjs-prisma --addDocker

Check out all options and give it a try with your Nest app.

Top comments (0)