From c8e18b759c0deea29671ce5e92e00e21071b24b4 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Wed, 6 Dec 2017 18:59:42 -0600 Subject: [PATCH] add debug if error happens in count() --- server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.js b/server.js index 0415948..d2352be 100644 --- a/server.js +++ b/server.js @@ -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 {