prizma 이상한거거

This commit is contained in:
wallace
2025-11-11 10:42:56 +09:00
parent 512acfb921
commit 218e915e37
12 changed files with 59 additions and 960 deletions

View File

@@ -1,14 +0,0 @@
import { PrismaClient } from './generated/prisma';
const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
};
export const prisma =
globalForPrisma.prisma ??
new PrismaClient({
log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
});
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;