// =======================================================================
// src/lib/server/database.ts (확장자 변경)
// =======================================================================
import pg from 'pg';
import { DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_DATABASE } from '$env/static/private';

const { Pool } = pg;

const pool = new Pool({
  host: DB_HOST,
  port: Number(DB_PORT),
  user: DB_USER,
  password: DB_PASSWORD,
  database: DB_DATABASE,
});

export default pool;