Skip to content
easy http file serving in ruby
Find file
Latest commit b828f95 @seanmoon add javascript mimetype
WEBRick does not have this configured out of the box


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.

example run

$ pwd
$ httplz
Document root is /Users/moon/workspace/, 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 | 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


Something went wrong with that request. Please try again.