adsf (A Dead Simple Fileserver) is a tiny web server that you can launch instantly in any directory, like this:
▸ ls -l total 0 drwxr-xr-x 2 ddfreyne staff 68 May 29 10:04 about drwxr-xr-x 2 ddfreyne staff 68 May 29 10:04 contact -rw-r--r-- 1 ddfreyne staff 0 May 29 10:04 index.html drwxr-xr-x 2 ddfreyne staff 68 May 29 10:04 projects ▸ adsf [2009-05-29 10:04:44] INFO WEBrick 1.3.1 [2009-05-29 10:04:44] INFO ruby 1.8.7 (2008-08-11) [i686-darwin9.6.1] [2009-05-29 10:04:44] INFO WEBrick::HTTPServer#start: pid=2757 port=3000
… and now you can go to http://localhost:3000/ and start browsing.
adsf will serve the index.html of requested directories. adsf does not have support for directory listings, so requesting a directory without index.html will simply return a 404.
You can install adsf using RubyGems, like this (will also install the Rack dependency):
> sudo gem install adsf
The code for adsf is available in the adsf repository on GitHub. Pull requests are welcome.
adsf is licenced under the liberal MIT licence.