hook.io-couch

emit hook.io events based on your CouchDB _changes feed

emit hook.io events based on your CouchDB _changes feed

Built using the Follow library by Jason Smith of Iris Couch

 git clone git@github.com:hookio/couch.git
 cd couch
 npm install
 node bin/couch
npm install hook.io-couch
hookio-couch --debug

Note: Using the default options hookio-couch will attempt to connect to http://localhost:5984/mydatabase

couch::change event emitted when a document is changed

couch::error event emitted when there is an error in your changes feed

hook.io-couch will also automatically detect CouchDB documents that conform to JSON-RPC 1.0. This means that a document that looks like this:

{
   "_id": "002da93490105bfab4466a756c00286d",
   "_rev": "14-6b9d6eed98e045a9a34b65d62667a10e",
   "method": "hello",
   "params": {
       "foo": "bar"
   }
}

Will emit:

hook.emit('hello', { "foo": "bar" });
{
 "feed-db": "http://localhost:5984/mydatabase",
 "feed-since": "now",
 "feed-heartbeat": 3000,
 "feed-inactivity": 8640000,
 "feed-include-docs" : true
}