add debug if error happens in count()

This commit is contained in:
Jim Minter 2017-12-06 18:59:42 -06:00
parent d1af14dc9f
commit c8e18b759c
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ app.get('/', function (req, res) {
// Create a document with request IP and current time of request
col.insert({ip: req.ip, date: Date.now()});
col.count(function(err, count){
if (err) {
console.log('Error running count. Message:\n'+err);
}
res.render('index.html', { pageCountMessage : count, dbInfo: dbDetails });
});
} else {