We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be0d5b3 commit 9cdcd01Copy full SHA for 9cdcd01
src/lib/prisma.ts
@@ -1,4 +1,4 @@
1
-import { PrismaClient } from "@prisma/client";
+import { PrismaClient } from '@prisma/client';
2
const globalForPrisma = global as unknown as { prisma: PrismaClient };
3
const prisma =
4
globalForPrisma.prisma ||
@@ -9,15 +9,15 @@ const prisma =
9
},
10
11
log: [
12
- "warn",
13
- "error",
+ 'warn',
+ 'error',
14
{
15
- level: "query",
16
- emit: "event",
+ level: 'query',
+ emit: process.env.NODE_ENV === 'production' ? 'event' : 'stdout',
17
18
],
19
});
20
21
-if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
+if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
22
23
export default prisma;
0 commit comments