Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
fix: use new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangoacher committed Mar 6, 2020
1 parent d04169f commit 77ff62f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/trail-core/database/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
'use strict'

const { Client } = require('pg')
const config = require('./config')
const { loadSettings } = require('./settings')

// Gather arguments

async function run () {
const { host, port, database, username: user, password, idleTimeoutMillis } = config()
const { host, port, database, username: user, password, idleTimeoutMillis } = loadSettings()
const client = new Client({ host, port, database: 'postgres', user, password, idleTimeoutMillis })

await client.connect()
Expand Down
2 changes: 1 addition & 1 deletion packages/trail-core/database/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ exports.loadSettings = options => {
username: resolve('dbUsername', 'TRAIL_DB_USERNAME', 'postgres'),
password: resolve('dbPassword', 'TRAIL_DB_PASSWORD', 'postgres')
}
console.log(settings)

return settings
}

0 comments on commit 77ff62f

Please sign in to comment.