import { drizzle } from 'drizzle-orm/postgres-js'; import postgres from 'postgres'; import * as schema from './schema'; // Create the connection const connectionString = process.env.DATABASE_URL ?? 'postgresql://postgres:postgres@localhost:5432/app'; const client = postgres(connectionString); // Create the database instance export const db = drizzle(client, { schema }); // Export schema for use in other files export * from './schema';