erp-comp / PrismaClient.js
sanjay7178's picture
Synced repo using 'sync_with_huggingface' Github Action
c6be938 verified
raw
history blame
259 Bytes
import { PrismaClient } from '@prisma/client'
let prisma
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.prisma) {
global.prisma = new PrismaClient()
}
prisma = global.prisma
}
export default prisma