notiz/blog/Introducing NestJS Prisma Schematics
August 17, 2020

Introducing NestJS Prisma Schematics

Schematics to easily add Prisma support to a NestJS application

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.

Author

Weeklyish Newsletter

Stay up to date with Angular, NestJS and more! Sign up to receive updates on our latest posts.

Blog