/**
 * Minimal PG pool using env vars:
 * PGHOST, PGUSER, PGPASSWORD, PGDATABASE, PGPORT
 */
const { Pool } = require('pg');

const pool = new Pool({
  host: process.env.PGHOST || 'localhost',
  user: process.env.PGUSER || 'postgres',
  password: process.env.PGPASSWORD || 'postgres',
  database: process.env.PGDATABASE || 'supersunday',
  port: Number(process.env.PGPORT || 5432),
});

module.exports = { pool };
