News for hackers. Stuff that matters.
Re:A web server in a shell script by tlrobinson on Tuesday November 02, 2010 @10:48PM (#1863410)
See also: 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?

There are no comments on this comment yet.