aboutsummaryrefslogtreecommitdiffstats
path: root/db.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2018-03-20 03:46:13 +0000
committerAdam Soltys <[email protected]>2018-03-20 03:46:37 +0000
commit3393eee9498fea178441f2d4783a5285914766ca (patch)
tree09841b75e6a2f71e15868242d26c0781a11bbd86 /db.js
parent84485d68ce6b881eb251d3714addb6da65324a7a (diff)
downloadcoinos-server-3393eee9498fea178441f2d4783a5285914766ca.tar.gz
coinos-server-3393eee9498fea178441f2d4783a5285914766ca.zip
changes for prod
Diffstat (limited to 'db.js')
-rw-r--r--db.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/db.js b/db.js
index d8f1c45b..c10b925d 100644
--- a/db.js
+++ b/db.js
@@ -15,11 +15,12 @@ import {
const Op = Sequelize.Op
const l = console.log
+const conf = config[process.env.NODE_ENV]
const auto = new SequelizeAuto(
- config.development.database,
- config.development.username,
- config.development.password,
+ conf.database,
+ conf.username,
+ conf.password,
config.auto
)
@@ -29,12 +30,12 @@ const tables = {
}
const db = new Sequelize(
- config.development.database,
- config.development.username,
- config.development.password,
+ conf.database,
+ conf.username,
+ conf.password,
{
- host: config.development.host,
- dialect: config.development.dialect,
+ host: conf.host,
+ dialect: conf.dialect,
logging: false,
dialectOptions: { multipleStatements: true },
operatorsAliases: false,