How do i stream response in express : <p>I've been trying to get a express app to send the response as stream.</p>

<pre><code>var Readable = require('stream').Readable;
var rs = Readable();


app.get('/report', function(req,res) {

    res.statusCode = 200;
    res.setHeader('Content-type', 'application/csv');
    res.setHeader('Access-Control-Allow-Origin', '*');

    // Header to force download
    res.setHeader('Content-disposition', 'attachment; filename=Report.csv');


    rs.pipe(res);

    rs.push("USERID,NAME,FBID,ACCOUNT,SUBSCRIPTION,PRICE,STATE,TIMEPERIOD\n");

    for (var i = 0; i &lt; 10; i++) {
        rs.push("23,John Doe,1234,500,SUBSCRIPITON,100,ACTIVE,30\n");
    }

    rs.push(null);
});      
</code></pre>

<p>It does print in the console when i replace "rs.pipe(res)" by "rs.pipe(process.stdout)" but how to make it work in express app.</p>

<pre><code>Error: not implemented
    at Readable._read (_stream_readable.js:465:22)
    at Readable.read (_stream_readable.js:341:10)
    at Readable.on (_stream_readable.js:720:14)
    at Readable.pipe (_stream_readable.js:575:10)
    at line "rs.pipe(res);"
</code></pre>
