summaryrefslogtreecommitdiff
path: root/topics/ui
diff options
context:
space:
mode:
authorjgart2021-08-31 10:12:36 -0400
committerjgart2021-08-31 10:12:36 -0400
commit486dc99ba300d5210f93b7b3294301b7fc8ac3f0 (patch)
treed0eec573d55c8ae11e80a876bfd5b38ac735bb2e /topics/ui
parent21a5571d9f2eb2052319946e2d737984acabfda1 (diff)
downloadgn-gemtext-486dc99ba300d5210f93b7b3294301b7fc8ac3f0.tar.gz
Add websocketd as a possible alternative to xtermjs
Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets.
Diffstat (limited to 'topics/ui')
-rw-r--r--topics/ui/adding-terminal-output.gmi22
1 files changed, 22 insertions, 0 deletions
diff --git a/topics/ui/adding-terminal-output.gmi b/topics/ui/adding-terminal-output.gmi
index a6dd895..a3e3350 100644
--- a/topics/ui/adding-terminal-output.gmi
+++ b/topics/ui/adding-terminal-output.gmi
@@ -5,3 +5,25 @@ GeneNetwork runs external tools. We would like to have an option for (advanced)
=> https://xtermjs.org/docs/api/addons/attach/ xterm.js websocket support
As GN3 (REST) API handles calling external tools it kinda make sense to handle the terminal output page through GN3 and communicate through websockets. But first I'll do a Sinatra test run.
+
+## possible xtermjs alternative
+
+=> https://github.com/joewalnes/websocketd possible xtermjs alternative
+
+=> http://websocketd.com/ home page with tutorials in various languages
+
+They forgot scheme:
+
+```
+(define (websocketd-loop n)
+"Count from 1 to n, pausing
+for a second between each iteration"
+ (if (zero? n)
+ 'done!
+ (begin
+ (display n)
+ (display "\n")
+ (sleep 1)
+ (websocketd-loop (- n 1)))))
+```
+