Skip to content

Commit

Permalink
Merge pull request sclorg#156 from jim-minter/issue17649
Browse files Browse the repository at this point in the history
add debug if error happens in count()
  • Loading branch information
bparees authored Dec 7, 2017
2 parents d1af14d + c8e18b7 commit debf979
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit debf979

Please sign in to comment.