diff options
author | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-29 04:13:18 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis.se@gmail.com> | 2013-04-29 04:13:18 +0200 |
commit | c1371f712789e97fac6351daee93a048b12db69b (patch) | |
tree | 0ffe7b97319018e75138646d5798039ab75f3b64 /app.js | |
parent | been cleaning a bit, moving stuff to where it belongs. signup and (diff) | |
download | Divid-c1371f712789e97fac6351daee93a048b12db69b.tar.gz |
cleaned up router.js
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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'; |