app.use(mount('/streaming', async function (ctx) { ctx.body = createReadStream(path.join(__dirname, 'stream.json')) .pipe(JSONStream.parse('rows.*.value')) .pipe(stringify()) }))
app.use(mount('/streaming', function *() { this.body = fs.createReadStream(path.join(__dirname, 'stream.json')) .pipe(JSONStream.parse('rows.*.value')) .pipe(stringify()) }))