tasko/lib/db.ts

11 lines
336 B
TypeScript

import { PrismaClient } from '@prisma/client/edge';
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 ??