mongo fix

This commit is contained in:
gosangam
2026-04-14 19:12:11 +05:30
parent e2f8063d90
commit beffb9fae1
172 changed files with 18029 additions and 1298 deletions
+11
View File
@@ -0,0 +1,11 @@
import { PrismaClient } from "@prisma/client";
const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
};
export const prisma = globalForPrisma.prisma ?? new PrismaClient();
if (process.env.NODE_ENV !== "production") {
globalForPrisma.prisma = prisma;
}