cosmopolitan
cosmopolitan copied to clipboard
redbean demo with an xterm.js powershell/bash
This is a proposal for a new demo for redbean-demo.
it invokes xterm.js and then creates a 2 way channel with redbean
- an SSE Server is created in redbean that forks an interactive shell like powershell.exe or bash (could be ssh) and sends the output to xterm.js
- POST requests are used to send user commands to the shell
it currently works for me on both windows 10 & a RockyLinux8 vm
it could probably be improved by using a tty/pty in the forked process but I was not sure how to do that from redbean.