feat (login page): add a sign in / log in page

This commit is contained in:
Pierre Ryssen
2026-03-03 14:47:07 +01:00
parent 7905adb55d
commit 53c5d952b5
19 changed files with 1756 additions and 50 deletions

21
lib/prisma.ts Normal file
View File

@@ -0,0 +1,21 @@
import { PrismaClient } from "@/app/generated/prisma/client";
import { PrismaPg } from "@prisma/adapter-pg";
import { Pool } from "pg";
const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
pool: Pool | undefined;
};
const pool = globalForPrisma.pool ?? new Pool({
connectionString: process.env.DATABASE_URL,
});
const adapter = new PrismaPg(pool);
export const prisma = globalForPrisma.prisma ?? new PrismaClient({ adapter });
if (process.env.NODE_ENV !== "production") {
globalForPrisma.prisma = prisma;
globalForPrisma.pool = pool;
}