4 ms·
See also: http://github.com/tlrobinson/wwwoosh http://github.com/tlrobinson/wwwoosh It includes a netcat-based webserver written in bash (that speaks CGI) as w
by tlrobinson 16y ago
See also: http://github.com/tlrobinson/wwwoosh http://github.com/tlrobinson/wwwoosh
It includes a netcat-based webserver written in bash (that speaks CGI) as well as a Sinatra-like micro "framework" for shell (that also speaks CGI) that lets you do things like this:
get "/DeanMartin.jpg" dean_handler
function dean_handler () {
header "Content-Type" "image/jpeg"
cat "DeanMartin.jpg"
}
Unfortunately I haven't figure out a way to get rid of that placeholder function name (e.x. "dean_handler" above). Ideas?