Skip to content

Instantly share code, notes, and snippets.

Created June 29, 2021 16:15
What would you like to do?
import { PrismaClient } from '@prisma/client';
const prisma = global.prisma || new PrismaClient();
if (process.env.NODE_ENV === 'development') global.prisma = prisma;
export default prisma;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment