Skip to content

Commit

Permalink
Merge pull request #511 from nightscout/wip/ENABLE-is-optional
Browse files Browse the repository at this point in the history
Wip/enable is optional
  • Loading branch information
jasoncalabrese committed Mar 23, 2015
2 parents 8889ceb + ff60b64 commit 28e42c2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node server.js
web: ./node_modules/.bin/forever --minUptime 100 -c node server.js
2 changes: 1 addition & 1 deletion env.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function config ( ) {
} else {
git.short(function record_git_head (head) {
console.log("GIT HEAD", head);
env.head = head;
env.head = head || readENV("SCM_COMMIT_ID", "");
});
}
env.version = software.version;
Expand Down
3 changes: 3 additions & 0 deletions lib/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ function init (env, cb) {
if (cb && cb.call) { cb(null, mongo); }
return;
}
if (!env.mongo) {
throw new Error("Mongo string is missing");
}
console.log("Connecting to mongo");
MongoClient.connect(env.mongo, function connected (err, db) {
if (err) {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
"sgvdata": "git://github.com/ktind/sgvdata.git#wip/protobuf",
"socket.io": "^0.9.17",
"git-rev": "git://github.com/bewest/git-rev.git",
"bootevent": "0.0.1"
"bootevent": "0.0.1",
"forever": "~0.13.0"
},
"devDependencies": {
"istanbul": "~0.3.5",
Expand Down

0 comments on commit 28e42c2

Please sign in to comment.