changes-stream
Forked from https://github.com/jcrugzz/changes-stream
A fault tolerant changes stream with builtin retry.
Inspired by [follow
][https://github.com/iriscouch/follow].
Notes
Attaching a 'readable' listener is not supported (yet).
Install
$ npm install @npmcorp/changes-stream --save
Test
$ npm run docker:fresh
$ npm test
$ DEBUG=changes-stream npm test
Alternatively, use COUCH_URI
to point to an existing CouchDB.
$ COUCH_URI=http://user:pass@example-couch.com:5984/changes_stream_db \
npm test
Options
Options to customize _changes
request.
{
db: 'http://localhost:5984/my_db',
feed: 'continuous',
filter: 'docs/whatever',
inactivity_ms: 60 * 60 * 1000,
timeout: undefined,
requestTimeout: 2 * 60 * 1000,
agent: undefined,
since: 0,
heartbeat: 30 * 1000,
style: 'main_only',
include_docs: false,
query_params: {},
use_post: false
}