easy http file serving
- ruby
test your HTML files without copying/symlinking to where your webserver is configured to serve content from.
also, for those of us who are too lazy to type/remember python -m SimpleHTTPServer
as that does pretty much the same thing this does.
$ pwd
/Users/moon/workspace/seanmoon.com
$ httplz
Document root is /Users/moon/workspace/seanmoon.com, using port 2999
[2011-07-22 06:47:31] INFO WEBrick 1.3.10
[2011-07-22 06:47:31] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.8.0]
[2011-07-22 06:47:31] INFO WEBrick::HTTPServer#start: pid=88585 port=2999
for system wide use
$ cd /usr/local/bin && curl -L http://github.com/seanmoon/httplz/tarball/master | gunzip | tar xvf - --strip=2
otherwise (you'll need rvm or your rubygem installation's bin directory in your PATH)
$ gem install httplz
Usage: httplz [directory] [options]
-p, --port [PORT] Port to run WEBrick on
-h, --help Print this help text
- if no directory is specified, the current working directory will be used.
- the default port is 2999