Created
November 10, 2025 19:12
-
-
Save codigoconjuan/1de865ab01deec9bf068b156363206c4 to your computer and use it in GitHub Desktop.
Cliente de Conexiones Prisma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { PrismaClient } from '@/src/generated/prisma/client' | |
| const globalForPrisma = global as unknown as { prisma: PrismaClient } | |
| export const prisma = | |
| globalForPrisma.prisma || | |
| new PrismaClient({ | |
| log: ['query'], | |
| }) | |
| if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment