Created
July 20, 2012 20:56
-
-
Save leobessa/3153162 to your computer and use it in GitHub Desktop.
Heroku Cedar static file server with 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' | |
require 'rack-rewrite' | |
use Rack::Static, :urls => ['/images'], :root => "public" | |
use Rack::Rewrite do | |
rewrite '/', '/index.html' | |
end | |
run Rack::Directory.new('public') |
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
source :rubygems | |
gem "rack", "~> 1.4" | |
gem "rack-rewrite", "~> 1.2.1" | |
gem "thin" |
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
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