11 lines
233 B
TypeScript
11 lines
233 B
TypeScript
import { PrismaClient } from "@prisma/client"
|
|
|
|
declare global {
|
|
var prisma: PrismaClient | undefined
|
|
}
|
|
|
|
const client = new PrismaClient()
|
|
if (process.env.NODE_ENV !== "production") globalThis.prisma = client
|
|
|
|
export default client
|