import { Kysely, PostgresDialect } from 'kysely';
import { type DB } from 'kysely-codegen';
import { Pool } from "pg";
import { env } from '../util';

export const db = new Kysely<DB>({
    dialect: new PostgresDialect({
        pool: new Pool({
            connectionString: env.DATABASE_URL,
        }),
    })
});
