mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
9 lines
235 B
TypeScript
9 lines
235 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
declare global {
|
|
var prisma: PrismaClient | undefined;
|
|
}
|
|
|
|
export const db = globalThis.prisma ?? new PrismaClient();
|
|
|
|
if (process.env.NODE_ENV !== 'production') globalThis.prisma = db;
|