10 lines
225 B
TypeScript
10 lines
225 B
TypeScript
import { PrismaClient } from "@prisma/client";
|
|
|
|
declare global {
|
|
var prismaClientSingleton: PrismaClient | undefined;
|
|
}
|
|
|
|
export const prisma = globalThis.prismaClientSingleton || new PrismaClient();
|
|
|
|
export default prisma;
|