feat: add prisma

This commit is contained in:
Daniel Soares committed 2021-12-13 15:53:40 -03:00
1 parent c7dc121d9e
commit 8c37b851f3
12 files changed
+341 -7

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import { PrismaClient } from '@prisma/client'
declare global {
var prisma: PrismaClient | undefined
}
export const prisma = global.prisma || new PrismaClient()
if (process.env.NODE_ENV !== 'production') global.prisma = prisma