I'm looking for a simple way to host any single interactive command line application, written in any language, on a web page. Using PHP's shell_exec works well for running a script and providing its output, but doesn't support stdin. For example:
echo shell_exec("python app.py arg1");
I assume there already exists a solution for this using a JavaScript-based CLI like Xterm.js asynchronously. Ideally, it would be lightweight enough to embed on a web page and point to a script.
SSH and extensions such as Google's Secure Shell App allow remote usage, but hosting any interactive command line app on a web page would be useful for linking to other people. CGI doesn't appear to be suitable for quickly running any script either.
Aucun commentaire:
Enregistrer un commentaire