Erster Docker-Stand

This commit is contained in:
Ali
2026-02-20 16:06:40 +09:00
commit f31e2e8ed3
8818 changed files with 1605323 additions and 0 deletions

14
src/prismaClient.js Normal file
View File

@@ -0,0 +1,14 @@
import { PrismaClient } from '@prisma/client';
import { PrismaPg } from '@prisma/adapter-pg';
import pg from 'pg';
// 1. Verbindungspool erstellen (nutzt deine DATABASE_URL aus der .env)
const pool = new pg.Pool({ connectionString: process.env.DATABASE_URL });
// 2. Den Prisma-Adapter für Postgres erstellen
const adapter = new PrismaPg(pool);
// 3. Den Client mit dem Adapter starten (WICHTIG für Prisma 7)
const prisma = new PrismaClient({ adapter });
export default prisma;