Merge pull request #156 from jim-minter/issue17649

add debug if error happens in count()
This commit is contained in:
Ben Parees 2017-12-06 23:18:36 -05:00 committed by GitHub
commit debf979e0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {