Skip to content
Snippets Groups Projects
Commit c8e18b75 authored by Jim Minter's avatar Jim Minter
Browse files

add debug if error happens in count()

parent d1af14dc
Branches
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment