joearms / ezwebframe

websockets framework toghter with cowboy as described in book
Other
184 stars 50 forks source link

redirect tty output to browser in demo shell #2

Closed uwiger closed 11 years ago

uwiger commented 11 years ago

First thing I tried with the shell demo was to enter c:regs(), which resulted in output in the real erlang shell, but not much in the browser.

This patch spawns a small group_leader process which collects IO generated by the evaluated command and sends it to the browser. The browser-side output is currently pretty ugly. I'll gladly leave that to some HTML/JS wiz to fix. :)