import * as schema from "db/schema";

export const host = process.env.POSTGRES_HOST ?? "";
export const user = process.env.POSTGRES_USER ?? "";
export const password = process.env.POSTGRES_PASSWORD ?? "";
export const database = process.env.POSTGRES_DB ?? "";
export const url = `postgresql://${user}:${password}@${host}/${database}`;

import { drizzle } from "drizzle-orm/bun-sql";
export default drizzle(url, { schema });
