linter fixes, env fixes
All checks were successful
Lint / Lint and Check (push) Successful in 51s

This commit is contained in:
2025-07-15 23:15:32 +02:00
parent f5fff9c52b
commit b02f5e6364
8 changed files with 169 additions and 66 deletions

View File

@@ -1,8 +1,14 @@
import { drizzle } from 'drizzle-orm/node-postgres';
import * as schema from './schema';
import 'dotenv/config';
import dotenv from 'dotenv';
dotenv.config({ path: ['.env.local', '.env'] });
export const db = drizzle(process.env.POSTGRES_URL!, { schema });
const DATABASE_URL = process.env.POSTGRES_URL;
if (!DATABASE_URL) {
throw new Error('POSTGRES_URL environment variable is required');
}
export const db = drizzle(DATABASE_URL, { schema });
// Re-export schema types for convenience
export * from './schema';