feat: use a function instead of arrow for new_client, martin will be happy

This commit is contained in:
Nemo D'ACREMONT 2024-10-25 19:03:02 +02:00
parent fda268a033
commit 1390039930
No known key found for this signature in database
GPG Key ID: 6E5BCE8022FA8276

View File

@ -7,17 +7,19 @@ const db_host = process.env.DB_HOST ?? "localhost";
const db_port = parseInt(process.env.DB_PORT ?? "5432");
console.log("=== DB CONFIG ===");
console.log(`DB_USER:\t\t${db_user}`);
console.log(`DB_USER:\t${db_user}`);
console.log(`DB_PASSWORD:\t${db_user}`);
console.log(`DB_NAME:\t\t${db_name}`);
console.log(`DB_HOST:\t\t${db_host}`);
console.log(`DB_PORT:\t\t${db_port}`);
console.log(`DB_NAME:\t${db_name}`);
console.log(`DB_HOST:\t${db_host}`);
console.log(`DB_PORT:\t${db_port}`);
console.log("=== END DB CONFIG ===");
export const new_client = () => new pg.Client({
export function new_client() {
return new pg.Client({
user: db_user,
password: db_password,
database: db_name,
host: db_host,
port: db_port,
});
});
}