From 29801c124f3e4a5d58cd6b1b3a78d4ad9c79ccfb Mon Sep 17 00:00:00 2001 From: Ran Guin Date: Thu, 20 May 2021 16:32:21 -0700 Subject: include knex global for linear queries --- db/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'db') diff --git a/db/index.js b/db/index.js index 41593069..d89cc828 100644 --- a/db/index.js +++ b/db/index.js @@ -11,6 +11,17 @@ db = new Sequelize(conf.database, conf.user, conf.password, { dialectOptions: conf.dialectOptions }); +debug('knex conf: ' + JSON.stringify(conf)) +knex = require('knex')({ + client: 'mysql2', + connection: { + user: conf.user, + password: conf.password, + database: conf.database, + host: conf.host + } +}) + require("./models/accounts.js"); require("./models/codes.js"); require("./models/deposits.js"); -- cgit v1.2.3