Added proper config options for PostgreSQL
This commit is contained in:
parent
873b3f59bc
commit
3594c4d353
2 changed files with 13 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue