Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: mocore on April 20, 2019, 03:42:07 PM
-
the dasht project : https://github.com/sunaku/dasht - "Search API docs offline, in terminal or browser https://sunaku.github.io/dasht/man"
has an interesting server using socat and /bin/sh
https://github.com/sunaku/dasht/blob/master/bin/dasht-server
https://github.com/sunaku/dasht/blob/master/bin/dasht-server-http
a lot of other examples of similar sort of thing can be found on tha interwebz
eg another using socat and bash : https://gist.github.com/mbbx6spp/0ba0406afe65db556eef - "ZOMG a bash powers HTTP web service that runs via the `socat` web app container" :)
i search the forum and was surprised that
this minimal server method did not appear to be mentioned ! :o
and so now it has .
-
Many possibility's exists for potential uses for this simple script server exist
Caching Server Scenario - http://forum.tinycorelinux.net/index.php/topic,4677.msg138694.html#msg138694
i just happened to find the one above while browsing the forum
its my intention to return to this thread at some point and post a simple example of how the above script/setup can be used/modified
but for now , in case it's not obvious it is requited to tce-load -i socat
to run the scripts !!
another good/simple example use could be to create a fav-icon server
-
a few more interesting examples
https://gitlab.com/girror-git-mirror/svr/shellscripthttpd - HTTPD written entirely in shell (works with Busybox)
and this one that requires bash
https://github.com/TooTallNate/bashttpd
which makes some interesting changes from its original fork
https://github.com/TooTallNate/bashttpd/commit/e46ca8994eba703a2ffb853c39599f0e5c0ef9b0 #Simplify things by using pipes instead of fds
https://github.com/TooTallNate/bashttpd/commit/1b79633adf7809dc2244c1c325bdea475cbb8dd4#Make stdin be the HTTP request body
* see also : http://forum.tinycorelinux.net/index.php/topic,22762.0.html# more shell !!
;D
(imho) it might be an interesting experiment to condense the functional style "pipes/stdin/stdout" ect of the ba shttpd and rework it to work with sh
like dasht or shellscripthttpd
could be ideal to create/host a local index.html of extensions
as was requested in http://forum.tinycorelinux.net/index.php/topic,22843.msg143165.html#msg143165# could we have a web-site index.html of extensions for tc10 64 and 32 bits?
-
didn't want to start a new thread for a couple of links
https://docs.github.com/en/pages
https://docs.gitlab.com/user/project/pages/
-
didn't want to start a new thread for a couple of links
fair enough i guess ... however
.. what *would you* have called the thread if you did ??
...what they might have to do with (honestly struggling to find relevance)
scripted-http-d idk tbh
most if not all the other links are
socat (or similar) + server.sh(or similar)
these are *some* enterprise http hosting a *service*
with a web gui you could host "pages" on ???
https://docs.github.com/en/pages
https://docs.gitlab.com/user/project/pages/
-
fwiw http and other svc hosting can be found on some of the links mention in
"Public Access *NIX System(s)" @
https://forum.tinycorelinux.net/index.php/topic,25400.msg162365.html#msg162365
(honestly struggling to find relevance)
...
these are *some* enterprise http hosting a *service*
with a web gui you could host "pages" on ???
unless your point was you it would be possible to create a similar web-ui locally on a socat-httpd !?