Created
April 9, 2012 19:20
-
-
Save nummi/2345825 to your computer and use it in GitHub Desktop.
Serve static files with Ruby and Rack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rack/rewrite' | |
use Rack::Rewrite do | |
rewrite '/', '/index.html' | |
end | |
use Rack::Static, :urls => ['/'], :root => "public" | |
run Rack::Directory.new('public') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment