Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Last active August 29, 2015 13:56
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/8896597 to your computer and use it in GitHub Desktop.
Save juliangruber/8896597 to your computer and use it in GitHub Desktop.
var genBody = require('koa-gen-body');
var fromStream = require('co-from-stream');
var sse = require('co-sse');
var fs = require('fs');
app.use(genBody());
app.use(function*(){
this.body = this.genBody(sse(fromStream(fs.createReadStream('path'))));
});
@hemanth
Copy link

hemanth commented Feb 9, 2014

Waiting for co-fs.pr#5 to be merged 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment