mirror of
https://github.com/harivansh-afk/Saas-Teamspace.git
synced 2026-04-19 21:00:33 +00:00
initial commit
This commit is contained in:
commit
ef9ccf22d3
133 changed files with 20802 additions and 0 deletions
9
lib/db.ts
Normal file
9
lib/db.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { PrismaClient } from '@prisma/client'
|
||||
|
||||
declare global {
|
||||
var prisma: PrismaClient | undefined
|
||||
}
|
||||
|
||||
export const db = globalThis.prisma || new PrismaClient()
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') globalThis.prisma = db
|
||||
Loading…
Add table
Add a link
Reference in a new issue