Martin Gross bio photo

Martin Gross

Solution seeker, building things, often in software.

Twitter Google+ LinkedIn Github

Sometimes you just need a very basic ad hoc http static server in your current directory. If Ruby is already installed you just need to run the following on the commandline:

ruby -rwebrick -e' 8000, DocumentRoot: Dir.pwd).start'

Or even shorter:

ruby -run -ehttpd . -p8000

The webserver will be available at http://localhost:8000 . Have fun!

For other environments look here.