From d010bcee56538cb5547903fe090d42fc4e728489 Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 11 Nov 2020 22:50:26 +0200 Subject: [PATCH] add mongodb --- swarmlab-app/src/run/app.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index dcebffc..1bb09a3 100644 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -79,18 +79,13 @@ MongoClient.connect(mongourl, function(err, database) { dbName.collection("devel_log").find({}, function(err, docs) { - -docs.each(function(err, doc) { - if(doc) { - console.log(doc); - } - else { - res.end(); - } - }); - - - + docs.each(function(err, doc) { + if(doc) { + console.log(doc); + } else { + console.log('error'); + } + }); }); /*