queuemongo

0.1.1 • Public • Published

QueueMongo Build Status Coverage Status

QueueMongo is a node.js client for a queue service built over MongoDB.

Usage

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();
  }
);

Tests

You can run the tests with npm test, or run with coverage reporting with npm test --coverage.

Release History

  • 0.1.1 Changed expected DB host to full URI, cleaning up

  • 0.1.0 Initial release

Package Sidebar

Install

npm i queuemongo

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • pleary