Skip to content

Instantly share code, notes, and snippets.

@phuphighter
Created August 17, 2010 15:19
Show Gist options
  • Save phuphighter/530357 to your computer and use it in GitHub Desktop.
Save phuphighter/530357 to your computer and use it in GitHub Desktop.
Static site on Heroku
use Rack::Static, :urls => ["/stylesheets", "/images", "/javascripts"], :root => "public"
run lambda { |env| [200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('public/index.html', File::RDONLY)] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment