|
@ -271,17 +271,10 @@ MongoClient.connect(mongourl, OPTS, function(err, client){ |
|
|
/* other options */ |
|
|
/* other options */ |
|
|
}).stream(); |
|
|
}).stream(); |
|
|
|
|
|
|
|
|
stream.on('data', function (doc) { |
|
|
db.on('data', function (doc) { |
|
|
console.log(JSON.stringify(doc)) |
|
|
console.log(JSON.stringify(doc)) |
|
|
//socket.write(JSON.stringify({'action': 'log','param': doc.log}));
|
|
|
//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(); |
|
|
var RES = new Object(); |
|
@ -451,7 +444,7 @@ MongoClient.connect(mongourl, OPTS, function(err, client){ |
|
|
/* other options */ |
|
|
/* other options */ |
|
|
}).stream(); |
|
|
}).stream(); |
|
|
|
|
|
|
|
|
stream.on('data', function (doc) { |
|
|
db.on('data', function (doc) { |
|
|
console.log(JSON.stringify(doc)) |
|
|
console.log(JSON.stringify(doc)) |
|
|
//socket.write(JSON.stringify({'action': 'log','param': doc.log}));
|
|
|
//socket.write(JSON.stringify({'action': 'log','param': doc.log}));
|
|
|
}); |
|
|
}); |
|
|