From 3a091ff9a52e510c362ad57cc816599b8ae2b53a Mon Sep 17 00:00:00 2001 From: bananaappletw Date: Thu, 22 Dec 2016 19:42:00 +0800 Subject: Simplify code for heroku --- lib/models/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/models') diff --git a/lib/models/index.js b/lib/models/index.js index 1156d0f7..6fcffb5f 100644 --- a/lib/models/index.js +++ b/lib/models/index.js @@ -14,8 +14,9 @@ dbconfig.logging = config.debug ? logger.info : false; var sequelize = null; +// Heroku specific if (process.env.DATABASE_URL) - sequelize = new Sequelize(process.env.DATABASE_URL, dbconfig.username, dbconfig.password, dbconfig); + sequelize = new Sequelize(process.env.DATABASE_URL); else sequelize = new Sequelize(dbconfig.database, dbconfig.username, dbconfig.password, dbconfig); -- cgit v1.2.3