removed dumb $env/dynamic/private import and replaced with Bun.env

This commit is contained in:
George Powell
2026-02-05 18:14:13 -05:00
parent 6161ef75a1
commit c04899d419

View File

@@ -1,10 +1,9 @@
import { drizzle } from 'drizzle-orm/bun-sqlite';
import { Database } from 'bun:sqlite';
import * as schema from './schema';
import { env } from '$env/dynamic/private';
if (!env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
if (!Bun.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
const client = new Database(env.DATABASE_URL);
const client = new Database(Bun.env.DATABASE_URL);
export const db = drizzle(client, { schema });