Monday 18 April 2016

Let node run a shell command and display stdout in the browser (looking for libraries/best practices)

This is something I've been wondering about quite some time and I need it for a tool I'm currently building.I want to use node to run a system command and want to send the output of the command (stdout, and preferable stderr too) to the browser, live.Some tools that use this are for instance CI tools like CircleCI, and I think Heroku does something similar.I thought about logging the output to a file, tailing that file, and send it to the browser using a websocket though that somehow feels a bit hacky.There must be libraries out there that do this or similar things, but I can't find them.Any ideas about libraries or best practices for this?

Submitted April 19, 2016 at 03:46AM by beeman_nl

No comments:

Post a Comment