mirror of
https://github.com/fergalmoran/opengifame.git
synced 2025-12-22 09:38:44 +00:00
11 lines
259 B
TypeScript
11 lines
259 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
declare global {
|
|
var prisma: PrismaClient | undefined;
|
|
}
|
|
|
|
const client = globalThis.prisma || new PrismaClient();
|
|
if (process.env.NODE_ENV !== 'production') globalThis.prisma = client;
|
|
|
|
export default client;
|