Hi! I need a little help with the prisma, I have s...
# orm-help
o
Hi! I need a little help with the prisma, I have some microservices that need to access the PrismaClient, how can I export the configurations, models and methods so that I can access them?
r
@Octavio Augusto Barbosa 👋 The general way would be to create an NPM package with Prisma and its schema that can be shared with other microservices.
o
Hey @Ryan, I have an npm package created, how can I export the entire client to the other microservices?
r
Generating the client in a custom folder and packaging that should work fine. Then just downloading and creating an instance of
PrismaClient
from that package should work.
o
Okay, I did that, but the typescript build doesn't copy the .prisma/client folder to the build folder, which is published in npm. Do I need to copy manually?