import { Pool } from "pg";

console.log(process.env.DB_HOST);

const pg = new Pool({
	host: process.env.DB_HOST,
	user: process.env.DB_USER,
	password: process.env.DB_PASSWORD,
	database: process.env.DB_NAME,
	port: parseInt(process.env.DB_PORT as string),
});

// export pg to outside to use
export default pg;