title: Stream stdout from child process to browser via expressjs
body: <p>We have an app built using <code>nodejs</code>, <code>express</code> and <code>child_process.spawn</code>. One requirement is that we need to spawn a process at runtime and capture it's output and present it to the user. </p>
  
  <p>We have that working. However, we need to figure out a way to stream the output instead of waiting until the child process exists. </p>
  
  <p>We've looked around and couldn't find any clear cut examples and were wondering if anyone here had any ideas?</p>
  
  <p>Everything is working. We just don't care for the user experience of having to wait for the command to finish before showing the entire output. If we could stream it, that would be ideal so as the stdout data event was triggered, the browser would update with the new data. As right now it does come in chunks as opposed to one big blob.. so it's suited quite nicely to do this.</p>