Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janl/couch_dbupdates
couchdb modules to receive databases events in couchdb node
https://github.com/janl/couch_dbupdates
Last synced: 3 months ago
JSON representation
couchdb modules to receive databases events in couchdb node
- Host: GitHub
- URL: https://github.com/janl/couch_dbupdates
- Owner: janl
- License: other
- Fork: true (davidoccam/couch_dbupdates)
- Created: 2013-03-04T10:54:56.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-04T11:14:21.000Z (almost 12 years ago)
- Last Synced: 2024-04-07T01:27:38.330Z (9 months ago)
- Language: Erlang
- Size: 108 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# couch_dbupdates
`couch_dbupdates` is a simple couchdb modules to receive databases
events in couchdb node.It's actually **supported by all the [refuge](http://refuge.io) projects**:
- [refuge](https://github.com/refuge/refuge)
- [rcouch](https://github.com/refuge/rcouch)
- [rcouch_template](https://github.com/refuge/rcouch_template)## HTTP API
To get db events, do a GET to `/_db_updates` .
You can pass an optional query parameters:
* `feed` The feed can be `longpoll` (default) for longpolling, `eventsource`
for event stream or `continuous` for continuous feed.
* `timeout`: timeout before the longpolling connection close or when the
heartbeat is emitted.
* `heartbeat`: true, or false. an empty line is emittend when the
timeout occurs to maintain the connection active.## Example of usage
$ curl http://127.0.0.1:5984/_db_updates?feed=continuous
{"type":"created","db_name":"testdb"}
{"type":"updated","db_name":"testdb"}
{"type":"deleted","db_name":"testdb"}