Skip to content

Instantly share code, notes, and snippets.

@leobessa
Created July 20, 2012 20:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leobessa/3153162 to your computer and use it in GitHub Desktop.
Save leobessa/3153162 to your computer and use it in GitHub Desktop.
Heroku Cedar static file server with rack
require "rubygems"
require 'rack'
require 'rack-rewrite'
use Rack::Static, :urls => ['/images'], :root => "public"
use Rack::Rewrite do
rewrite '/', '/index.html'
end
run Rack::Directory.new('public')
source :rubygems
gem "rack", "~> 1.4"
gem "rack-rewrite", "~> 1.2.1"
gem "thin"
GEM
remote: http://rubygems.org/
specs:
daemons (1.1.8)
eventmachine (0.12.10)
rack (1.4.1)
rack-rewrite (1.2.1)
thin (1.4.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
PLATFORMS
ruby
DEPENDENCIES
rack (~> 1.4)
rack-rewrite (~> 1.2.1)
thin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment