aboutsummaryrefslogtreecommitdiff
path: root/web/app.js
diff options
context:
space:
mode:
authorKumar Damani <damani.kumar@gmail.com>2019-03-04 23:44:03 +0000
committerGitHub <noreply@github.com>2019-03-04 23:44:03 +0000
commit4c0c485c37eaa5dda07c31947d4d11e18448f943 (patch)
treee4691429ed02491fba13de2a1e5b5102b19ccd77 /web/app.js
parent76214c83dc52d4dca6e5043fe374da57a54f9738 (diff)
parent5dd172866ff87842db07e563b3cb77cc3c2577a8 (diff)
Merge pull request #20 from csc301-winter-2019/feat7-qa-merging
Feat7 qa merging
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);