stacker.news/api/models/index.js

8 lines
189 B
JavaScript
Raw Normal View History

2021-03-25 19:29:24 +00:00
import { PrismaClient } from '@prisma/client'
2021-06-03 20:36:02 +00:00
const prisma = global.prisma || new PrismaClient()
2021-03-25 19:29:24 +00:00
2021-06-03 20:36:02 +00:00
if (process.env.NODE_ENV === 'development') global.prisma = prisma
export default prisma