diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-02-28 16:11:06 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-02-28 16:11:06 +0300 |
commit | 142869948c40900569f339a2177e95a3be3bbdfb (patch) | |
tree | 88011b401ce178767744bf6665d580c83d4e6ad3 /src/db.js | |
parent | 203fe6221b07784bd595cadd7fc7516020c683cb (diff) |
config refactor
Diffstat (limited to 'src/db.js')
-rw-r--r-- | src/db.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -const {workerConfig} = require('./config') +const config = require('./config') const {getLogger} = require('./logger') const mysql = require('promise-mysql') @@ -7,10 +7,10 @@ const logger = getLogger('db') async function init() { link = await mysql.createConnection({ - host: workerConfig.mysql_host, - user: workerConfig.mysql_user, - password: workerConfig.mysql_password, - database: workerConfig.mysql_database + host: config.get('mysql_host'), + user: config.get('mysql_user'), + password: config.get('mysql_password'), + database: config.get('mysql_database') }) } |