Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Created February 9, 2014 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliangruber/8896716 to your computer and use it in GitHub Desktop.
Save juliangruber/8896716 to your computer and use it in GitHub Desktop.
var genBody = require('koa-gen-body');
var fs = require('co-fs');
var sse = require('co-sse');
app.use(genBody());
app.use(function*(){
this.body = this.genBody(sse(fs.createReadStream('path')));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment