Parameterize configuration
This commit is contained in:
parent
6d1c65fd10
commit
811f3fff25
1 changed files with 5 additions and 5 deletions
10
db/index.js
10
db/index.js
|
@ -1,10 +1,10 @@
|
|||
const { Pool } = require('pg')
|
||||
const pool = new Pool({
|
||||
user: 'admin',
|
||||
host: '127.0.0.1',
|
||||
database: 'platoo',
|
||||
password: 'm1y2s3q4l5',
|
||||
port: 5432,
|
||||
user: process.env.user || 'admin',
|
||||
host: process.env.host || '127.0.0.1',
|
||||
database: process.env.database || 'platoo',
|
||||
password: process.env.password,
|
||||
port: process.env.port || 5432,
|
||||
})
|
||||
module.exports = {
|
||||
query: (text, params, callback) => {
|
||||
|
|
Loading…
Reference in a new issue