add debug if error happens in count()
This commit is contained in:
parent
d1af14dc9f
commit
c8e18b759c
|
@ -67,6 +67,9 @@ app.get('/', function (req, res) {
|
||||||
// Create a document with request IP and current time of request
|
// Create a document with request IP and current time of request
|
||||||
col.insert({ip: req.ip, date: Date.now()});
|
col.insert({ip: req.ip, date: Date.now()});
|
||||||
col.count(function(err, count){
|
col.count(function(err, count){
|
||||||
|
if (err) {
|
||||||
|
console.log('Error running count. Message:\n'+err);
|
||||||
|
}
|
||||||
res.render('index.html', { pageCountMessage : count, dbInfo: dbDetails });
|
res.render('index.html', { pageCountMessage : count, dbInfo: dbDetails });
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue