add debug if error happens in count()
This commit is contained in:
parent
d1af14dc9f
commit
c8e18b759c
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue