Skip to content

Instantly share code, notes, and snippets.

@jonezy
Created March 25, 2012 21:45
Show Gist options
  • Select an option

  • Save jonezy/2200087 to your computer and use it in GitHub Desktop.

Select an option

Save jonezy/2200087 to your computer and use it in GitHub Desktop.
Config.ru for static site on heroku.com
# put this file in the root of a foler, then put index, c and j in ./public and deploy to heroku
use Rack::Static,
:urls => ["/stylesheets", "/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