Browse Source

Merge pull request #66 from crowi/fix-mongolab-env-changes

Add  support for new ENV name for mongolab add-on
Sotaro KARASAWA 10 years ago
parent
commit
5db9d61a04
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/crowi/index.js

+ 2 - 1
lib/crowi/index.js

@@ -111,7 +111,8 @@ Crowi.prototype.event = function(name, event) {
 
 Crowi.prototype.setupDatabase = function() {
   // mongoUri = mongodb://user:password@host/dbname
-  var mongoUri = this.env.MONGOLAB_URI ||
+  var mongoUri = this.env.MONGOLAB_URI || // for B.C.
+    this.env.MONGODB_URI || // MONGOLAB changes their env name
     this.env.MONGOHQ_URL ||
     this.env.MONGO_URI ||
     'mongodb://localhost/crowi'