Feat: Add user login / logout
This commit is contained in:
parent
40c451b2c0
commit
ac3cf943f2
32 changed files with 7315 additions and 0 deletions
13
app/lib/db.ts
Normal file
13
app/lib/db.ts
Normal 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.
|
Loading…
Add table
Add a link
Reference in a new issue