aboutsummaryrefslogtreecommitdiff
path: root/web/app.js
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 17:49:21 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 17:49:21 +0000
commit5dd172866ff87842db07e563b3cb77cc3c2577a8 (patch)
treee4691429ed02491fba13de2a1e5b5102b19ccd77 /web/app.js
parent76214c83dc52d4dca6e5043fe374da57a54f9738 (diff)
parent9764fba35cdac7e226dad65f061c09fd3d9909cc (diff)
merged feat7 into temp
Diffstat (limited to 'web/app.js')
-rw-r--r--web/app.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/web/app.js b/web/app.js
index 488304d..f0ae3a5 100644
--- a/web/app.js
+++ b/web/app.js
@@ -23,24 +23,24 @@ app.use(express.static(path.join(__dirname, 'public')));
var env = process.env.NODE_ENV || 'development';
var uri;
if (env === 'development') {
- uri = 'mongodb://localhost:27017/helpthehome'
- // use for small testing only if really necessary
- // uri = 'mongodb+srv://development:dreamteam@cluster0-krnr4.mongodb.net/helpthehome?retryWrites=true'
+ uri = 'mongodb://localhost:27017/helpthehome'
+ // use for small testing only if really necessary
+ // uri = 'mongodb+srv://development:dreamteam@cluster0-krnr4.mongodb.net/helpthehome?retryWrites=true'
} else if (env === 'qa') {
- uri = process.env.MONGODB_URI
+ uri = process.env.MONGODB_URI
} else if (env === 'production') {
- uri = ''
+ 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);