koa-sse

Server-Sent Events utility for koa

npm install koa-sse
5 downloads in the last week
5 downloads in the last month

koa-sse

Example

var koa = require('koa');
var sse = require('koa-sse');

var app = koa();

app.use(sse());
app.use(function*(){
  this.sse(someStreamStream());
});

app.listen(3000);

Installation

$ npm install koa-sse

API

sse()

Add this.see to contexts.

this.sse(stream[, opts])

Options are passed down to sse-stream.

License

MIT

npm loves you