Added proper config options for PostgreSQL

This commit is contained in:
TheEssem 2020-12-18 15:42:34 -06:00
parent 873b3f59bc
commit 3594c4d353
2 changed files with 13 additions and 6 deletions

View file

@ -31,10 +31,10 @@ if (process.env.DB === "mongo") {
} else if (process.env.DB === "postgres") {
const { Pool } = require("pg");
const pool = new Pool({
user: "esmbot",
host: "localhost",
database: "esmbot",
port: 5432
user: process.env.PG_USER,
host: process.env.PG_HOST,
database: process.env.PG_DB,
port: process.env.PG_PORT
});
exports.connection = pool;
}