Browse Source

mongo tail

master
zeus 4 years ago
parent
commit
151ab6cfbc
  1. 6
      swarmlab-app/src/run/app.js

6
swarmlab-app/src/run/app.js

@ -406,7 +406,9 @@ function onCollection(err, collection) {
//cursorStream.on('data', function (data) {
cursor.on('data', function (data) {
console.log(data.value);
console.log('data ' + data.value);
var user = "anagnostopoulos@uniwa.gr"
io.in(user).emit("logdata", reslog);
itemsProcessed++;
});
@ -442,7 +444,7 @@ var stream = db.collection('logs').find({}, {
}).stream();
stream.on('data', function (doc) {
console.log(JSON.stringify(doc))
console.log('doc ' JSON.stringify(doc))
//socket.write(JSON.stringify({'action': 'log','param': doc.log}));
});
/*

Loading…
Cancel
Save