node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

koa-sse

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