Hi, I'm using Nx with NestJS and Prisma for my fin...
# orm-help
f
Hi, I'm using Nx with NestJS and Prisma for my final university project. I want to create two back-end applications, one with monolithic architecture and another one with microservices. I kept those application in monorepo using Nx. What I want to accomplished is how to reusing most of the app logic (like services, etc) between those two applications but with different Prisma schema (ex. one for product, one for user, etc) and still can use models from Prisma client between those two applications. Anyone have a suggestion how can I workaround this struggle? Thanks and sorry for my bad language.
n
Hey 👋 Welcome to our slack community! For reusing common functions between both of your apps one approach would be to create an npm package exposing these methods and you can import them into your applications. You could even expose types generated by PrismaClient from the npm package and use them in other apps.