in reply to Simple http server one-liner for some static files?
There are probably 5 ways to do that. Here's one that supports executables too:
A Tiny Web Server - Here is how you could write a simplistic web server that works with static and dynamic pages (IO::All):perl -MIO::All -e 'io(":8080")->fork->accept->(sub { $_[0] < io(-x $1 ? "./$1 |" : $1) if /^GET \/(.*) / })'
Only recommended for personal use.
|
---|