Skip to content

Instantly share code, notes, and snippets.

@johndbritton
Created July 12, 2011 20:08
Show Gist options
  • Save johndbritton/1078857 to your computer and use it in GitHub Desktop.
Save johndbritton/1078857 to your computer and use it in GitHub Desktop.
Example rackup file for serving static content with Heroku.
use Rack::Static, :urls => ["/css", "/images"], :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