|
|
| XP is just a number | |
| PerlMonks |
Re: Simple http server one-liner for some static files?by Your Mother (Archbishop) |
| on Oct 13, 2010 at 20:22 UTC ( [id://865152]=note: print w/replies, xml ) | Need Help?? |
|
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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||