feat: auth

This commit is contained in:
Dex404 2024-04-22 03:45:44 +00:00
parent 88c7d2e2c1
commit 16c730a69b
9 changed files with 477 additions and 121 deletions

9
lib/prisma.ts Normal file
View file

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