We have an app built using nodejs, express and child_process.spawn. One requirement is that we need to spawn a process at runtime and capt
nodejs
express
child_process.spawn
The response object of an Express route is also an instance of writable stream, so that allows you to pipe the child process' stdio streams to the response.
stdio
app.get('/path', function(req, res) { var child = spawn('ls', ['-al']); child.stdout.pipe(res); });