first commit

This commit is contained in:
rodrigo committed 2025-04-10 23:07:21 -03:00
commit c9fb67e751
423 files changed
+53287

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { PrismaClient } from '@prisma/client';
export const prisma = new PrismaClient({
log: process.env.PRISMA_LOG_LEVEL === 'debug'
? ['query', 'info', 'warn', 'error']
: ['error'],
});
// Tratar eventos de desconexão
prisma.$on('beforeExit', async () => {
await prisma.$disconnect();
});
export default prisma;