QueueMongo is a node.js client for a queue service built over MongoDB.
Creating an instance of a queue:
var QueueMongo = require('queuemongo');
var q = new QueueMongo('mongodb://127.0.0.1:27017', 'myQueue', function(err) { });
Adding items to a queue:
q.pushItem({ attr: 'val' }, function(err, doc) { });
Iterating through a queue with a specified callback:
q.iterate(
function(doc, finish) {
console.log(doc);
finish(doc);
},
function() {
q.db.close();
}
);
You can run the tests with npm test
, or run with coverage reporting with npm test --coverage
.
-
0.1.1 Changed expected DB host to full URI, cleaning up
-
0.1.0 Initial release