aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-04-29 04:13:18 +0200
committerDennis Eriksen <dennis.se@gmail.com>2013-04-29 04:13:18 +0200
commitc1371f712789e97fac6351daee93a048b12db69b (patch)
tree0ffe7b97319018e75138646d5798039ab75f3b64 /app.js
parentbeen cleaning a bit, moving stuff to where it belongs. signup and (diff)
downloadDivid-c1371f712789e97fac6351daee93a048b12db69b.tar.gz
cleaned up router.js
Diffstat (limited to 'app.js')
-rw-r--r--app.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/app.js b/app.js
index 5bc039d..3d7cef3 100644
--- a/app.js
+++ b/app.js
@@ -21,7 +21,11 @@ var port = process.env.PORT || 8000
// Bootstrap db connection
mongoose.connect(config.db);
-
+var db = mongoose.connection;
+db.on('error', console.error.bind(console, 'connection error:'));
+db.once('open', function callback(){
+ console.log('Connected to MongoDB');
+});
// Bootstrap models
var models_path = __dirname + '/models';