All checks were successful
Build and Push Nightly CI Image / build_and_push (push) Successful in 1m47s
Build and Push Docker Image / build_and_push (push) Successful in 3s
9 lines
262 B
TypeScript
9 lines
262 B
TypeScript
import { PrismaClient } from "@prisma/client"
|
|
|
|
const globalForPrisma = global as unknown as { prisma: PrismaClient }
|
|
|
|
export const prisma = globalForPrisma.prisma || new PrismaClient()
|
|
|
|
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma
|
|
|