Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Simple http server one-liner for some static files?

by Your Mother (Bishop)
on Mar 21, 2016 at 12:31 UTC ( #1158433=note: print w/replies, xml ) Need Help??


in reply to Simple http server one-liner for some static files?

And since this dead horse is apparently still being flogged. :P This is the one-liner I tend to use (because there are other middlewares and such that are easy to add and play with).

plackup -p 5000 -MPlack::App::Directory -e 'Plack::App::Directory->new +({root => q{.}})->to_app'

I understand that using the tools to get a local Perl install and such are not super easy. They are not too difficult once you get the hang of them. What I would recommend if you decide it's worth the effort: local::lib, cpanm, and perlbrew (and tangentially: Plack for wsgi like Perl -> psgi).

Update: missing preposition.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1158433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2018-08-15 03:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (158 votes). Check out past polls.

    Notices?