tasko/lib/db.ts
2024-03-17 00:48:01 -04:00

11 lines
331 B
TypeScript

import { PrismaClient } from '@prisma/client';
import { withAccelerate } from '@prisma/extension-accelerate';
declare global {
var prisma: PrismaClient | undefined;
}
export const db = new PrismaClient().$extends(withAccelerate());
// if (process.env.NODE_ENV !== 'production') globalThis.prisma = db;
// globalThis.prisma ??