Bug fixes and refactoring

This commit is contained in:
AG
2025-12-06 16:14:28 +02:00
parent 4106f3b783
commit 890f4f0958
13 changed files with 188 additions and 214 deletions

View File

@@ -1,7 +1,5 @@
import { PrismaClient } from '@prisma/client';
import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3';
import BetterSqlite3 from 'better-sqlite3';
import path from 'path';
// Ensure env vars are loaded
import 'dotenv/config';
@@ -18,6 +16,7 @@ if (!dbUrl) {
throw new Error("DATABASE_URL environment variable is not set. Please check your .env file.");
}
console.log('Initializing Prisma Adapter with URL:', dbUrl);
const adapter = new PrismaBetterSqlite3({ url: dbUrl });
const prisma =