This commit is contained in:
Janis
2023-01-30 11:42:43 +01:00
parent d3e5295832
commit bc29de3255
119 changed files with 26881 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { PrismaClient } from '@prisma/client';
let prisma: PrismaClient;
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient();
} else {
if (!global.prisma) {
global.prisma = new PrismaClient();
}
prisma = global.prisma;
}
export default prisma;