aboutsummaryrefslogtreecommitdiff
path: root/src/db.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.js')
-rw-r--r--src/db.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/db.js b/src/db.js
index 0ffba84..7874a92 100644
--- a/src/db.js
+++ b/src/db.js
@@ -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')
})
}