mirror of
https://github.com/R0m1k3/Menu.git
synced 2026-10-11 17:28:28 +02:00
feat: initialize Prisma client with better-sqlite3 adapter
This commit is contained in:
1 parent
eff3d0402d
commit
7cefa5852a
2 files changed
+5
-5
No files matched your search
@@ -10,6 +10,8 @@ const globalForPrisma = global as unknown as { prisma: PrismaClient };
|
||||
const createPrismaClient = () => {
|
||||
const dbUrl = process.env.DATABASE_URL || 'file:/app/prisma/dev.db';
|
||||
console.log(`[DB] Connecting to: ${dbUrl}`);
|
||||
|
||||
// Wrap with the Prisma driver adapter
|
||||
const adapter = new PrismaBetterSqlite3({ url: dbUrl });
|
||||
return new PrismaClient({ adapter });
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user