diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 94258eb..9f584c6 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -271,17 +271,10 @@ MongoClient.connect(mongourl, OPTS, function(err, client){ /* other options */ }).stream(); -stream.on('data', function (doc) { +db.on('data', function (doc) { console.log(JSON.stringify(doc)) //socket.write(JSON.stringify({'action': 'log','param': doc.log})); }); - /* - db.collection(function(err, collections) { - collections.forEach(function(coll) { - console.log(coll.s.name); - }); - }); - */ } }); var RES = new Object(); @@ -451,7 +444,7 @@ MongoClient.connect(mongourl, OPTS, function(err, client){ /* other options */ }).stream(); -stream.on('data', function (doc) { +db.on('data', function (doc) { console.log(JSON.stringify(doc)) //socket.write(JSON.stringify({'action': 'log','param': doc.log})); });