Jeff Lembeck learns a code or two

Serious code business!

simple_http_server.ru

In things that are bad ass that I've found on the internet lately, here is a post on how to do Python's SimpleHTTPServer: ruby's “python -m simplehttpserver”

I've been using it ever since.

The meat of this is to install rack (sudo gem install rack), throw the code into a rackup file

#!/usr/bin/env rackup
#\ -E deployment

use Rack::ContentLength

app = Rack::Directory.new Dir.pwd
run app

And have fun.

Thanks, SAMSON WU.

Also, hey, watch this thing grow: https://github.com/jlembeck/simplehttpserver

Back to Blog