Re:25 Even More Slick Linux Commands
by jrockway on Monday December 27, 2010 @01:32AM
(#2041966)
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 whatever". Not quite as convenient as github, but better than being stuck with the buggy version at work :)
(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 whatever". Not quite as convenient as github, but better than being stuck with the buggy version at work :)