Feat: Add user login / logout

This commit is contained in:
globuzma 2024-11-19 00:03:05 +01:00
parent 40c451b2c0
commit ac3cf943f2
32 changed files with 7315 additions and 0 deletions

13
app/lib/db.ts Normal file
View file

@ -0,0 +1,13 @@
import { PrismaClient } from '@prisma/client'
const prismaClientSingleton = () => {
return new PrismaClient()
}
declare global { }
declare const globalThis: {
prismaGlobal: ReturnType<typeof prismaClientSingleton>;
} & typeof global;
export const db = globalThis.prismaGlobal ?? prismaClientSingleton() // Creating a new instance of PrismaClient.