3 ms·
I use this alias: alias http="plackup -MPlack::App::Directory -e 'Plack::App::Directory->new({ root => \$ENV{PWD} })->to_app;'" Which starts a webserver t
by jrockway 16y ago
I use this alias:
alias http="plackup -MPlack::App::Directory -e 'Plack::App::Directory->new({ root => \$ENV{PWD} })->to_app;'"
Which starts a webserver that serves the current directory over HTTP. You can even pass args like --port 8080 to set the port.
(I most recently used this to git clone some library I wrote while at work. They recently blocked github, so I ssh'd to my home machine from my phone, cd ~/projects, http, and then did "git clone http://snowball2.jrock.us:5000/whatever/.git http://snowball2.jrock.us:5000/whatever/.git whatever". Not quite as convenient as github, but better than being stuck with the buggy version at work :)