u/StandardAd2078

▲ 12 r/nestjs

Prisma + NestJS Monorepo

I'm building a system using a microservices architecture in a NestJS monorepo. I used to work with TypeORM, but I'm trying to switch to Prisma (still learning it) because it feels way cleaner and I won’t end up with a million entity.ts files.

My plan is to have one database per microservice, with each app having its own schema. The problem is… I can't get this setup working properly.

Also, I really don’t want to duplicate code by creating a separate PrismaService for every app.

Has anyone dealt with something similar? How are you handling Prisma in a monorepo with multiple microservices without repeating a bunch of code?

Any tips or patterns I should look into?

reddit.com
u/StandardAd2078 — 5 days ago