e-conomic/phantom-render-stream — pull request #56 by kapetan (2014-10-06 20:38:08+00:00)
Title: Render returns a duplex stream

[Issue 31](https://github.com/e-conomic/phantom-render-stream/issues/31)

The buffered input is cached in memory and served from an internal `http` server, which is started on-demand. So it's possible to pipe directly to render.

```js
var phantom = require('phantom-render-stream');
var fs = require('fs');

var render = phantom();

fs.createReadStream('file.html')
.pipe(render({ format: 'png' }))
.pipe(fs.createWriteStream('file.png'));
```