Created
February 9, 2014 09:37
-
-
Save juliangruber/8896716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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