diff options
| author | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-04-23 18:36:36 +0000 |
|---|---|---|
| committer | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-04-23 18:36:36 +0000 |
| commit | 0380ba5ea5c134f3b7c79efae4daa1034d405daf (patch) | |
| tree | 63c8b95e5b88738c7562b2c22766f7c90f01778e /web/app.js | |
| parent | 8808175e3aa8ffc4022e58c9f926abfd28ce62c4 (diff) | |
| parent | 8135fe42bfa36df72c427e8d567aad2182e14372 (diff) | |
Merge branch 'master' into qa
Diffstat (limited to 'web/app.js')
| -rw-r--r-- | web/app.js | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -24,21 +24,21 @@ app.use(require('./routes/sse')); var env = process.env.NODE_ENV || 'development'; var uri; if (env === 'development') { - uri = 'mongodb://localhost:27017/helpthehome' + uri = 'mongodb://localhost:27017/helpthehome' } else { - // for qa and production set it on heroku config vars - uri = process.env.MONGODB_URI + // for qa and production set it on heroku config vars + uri = process.env.MONGODB_URI } // Mongoose connection to MongoDB mongoose.connect(uri, { useNewUrlParser: true }, function (error) { - if (error) { - console.log(error); - console.log("App was not able to connect to the mongo server!"); - console.log("... double check that the mongo server is running locally"); - } else { - console.log(`connected to ${uri}`); - } + if (error) { + console.log(error); + console.log("App was not able to connect to the mongo server!"); + console.log("... double check that the mongo server is running locally"); + } else { + console.log(`connected to ${uri}`); + } }); app.use('/', indexRouter); |
