Hello everyone, what is the best approach when try...
# orm-help
m
Hello everyone, what is the best approach when trying to use the same Prisma client / Prisma artefacts across multiple microservices? Any references or opinions are welcomed! (e.g. I have a two microservices in node and I want to reuse Prisma artefacts so that I don't duplicate code (prisma.schema, migrations, etc) in both codebases)
1
n
Hey 👋 You could create an npm package which exports the schema file, PrismaClient and generated Prisma types and then use it in all the microservices.
👍 1
m
Thanks, and in this case, if I need to manage migrations in a deployed environment, should I use the package and the prisma migrate cli, or is there like a tool to manage migrations?
n
You can use the package and the prisma migrate cli 👍