co-sse
Server-Sent Events generator stream
Example
Create a sse stream from a function:
var sse = ;var wait = ;var co = ; ;
Outputs:
$ make exampledata: 1391517447428 data: 1391517448462 data: 1391517449464 data: 1391517450466 data: 1391517451467
Installation
$ npm install co-sse
API
sse(fn[, opts])
Create a generator function that reads and converts data from fn
into
the Server-Sent Events
format.
Options:
- retry: Set the retry interval
License
MIT