couch-sync

0.0.2 • Public • Published

couch-sync

this is like following a view!

couch-sync requests a view, then listens on the _changes feed, pipeing the results through the map function so that you have always upto date view data, in memory!

npm install couch-sync
var sync = require('couch-sync')
  ({url: 'http:you.iriscouch.com/database', auth: ...})
  ({
    name: 'whatever', //name for design doc
    filter: function (doc) {
     //see the couch documentation for filters
    
    },
    map: function (doc) {
      // see the couch documentation for views
    
    }
  })
 
sync.on('data', function (doc) {
  //doc will be 
})
 

todo

  • encourage the couchdb team to include this feature into couchdb

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i couch-sync

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • nopersonsmodules