Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README

  • Loading branch information...
commit b2e63d16fe79504dc50ccc6021dcfda1409e6b27 1 parent dd5d43c
@scttnlsn authored
Showing with 5 additions and 6 deletions.
  1. +5 −6
@@ -9,9 +9,8 @@ Example
var mubsub = require('mubsub');
-var channel ='test');
+var client = mubsub('mongodb://localhost:27017/mubsub_example');
+var channel ='test');
channel.subscribe({ foo: 'bar' }, function(doc) {
console.log(; // => 'bar'
@@ -34,7 +33,7 @@ Usage
A channel maps one-to-one with a capped collection (Mubsub will create these if they do not already exist in the database). Optionally specify the byte size of the collection or/and max number of documents in the collection when creating a channel:
-var channel ='foo', { size: 100000, max: 500 });
+var channel ='foo', { size: 100000, max: 500 });
### Subscribe ###
@@ -57,10 +56,10 @@ channel.publish(doc, callback);
Publishing a document simply inserts the document into the channel's capped collection. Note that Mubsub will remove any specified document `_id` as the natural ordering of `ObjectId`s is used to ensure subscribers do not receive notifications of documents inserted in the past. Callback is optional.
-### Disconnect ###
+### Close ###
Closes the MongoDB connection.
Please sign in to comment.
Something went wrong with that request. Please try again.