Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

331
Visualizações
Share Prisma Types Between Microservices

I'm working on a project right now that has multiple TypeScript microservices performing operations on the same database. In each microservice, we are using the Prisma client to perform database operations. The issue I'm experiencing is we need to duplicate our schema.prisma file in each microservice and generate the Prisma client for each service. Is there a way to manage our database in a separate project while sharing the generated client between the microservices without having duplicate schema.prisma in each project?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

prisma generates a client from the schema. This client is as far as im aware totally independent of the schema files and the prisma package. If you copy those generated files in any way, you can reuse the client in a different project.

There is a nice article on medium using npm packages I guess. https://isidoro-ferreiro.medium.com/share-your-prisma-client-across-projects-44d1c7aca6fd

However u could also use something like nodemon or your ci pipeline to copy the generated client files to the other services.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda