Skip to content

Instantly share code, notes, and snippets.

@roelven
Created July 4, 2012 13:09
Show Gist options
  • Save roelven/3047256 to your computer and use it in GitHub Desktop.
Save roelven/3047256 to your computer and use it in GitHub Desktop.
Config for a static site on Heroku
use Rack::Static,
:urls => ["/css", "/img", "/favicon.ico"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
# Gemfile
source "http://rubygems.org"
gem "rack"
@robb
Copy link

robb commented Jul 4, 2012

Y U NO gh-pages?

@roelven
Copy link
Author

roelven commented Jul 4, 2012

@robb: I haz for mah own site: http://roelvanderven.com ;)

@robb
Copy link

robb commented Jul 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment