Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
Created November 1, 2011 21:20
Show Gist options
  • Select an option

  • Save aviflombaum/1331952 to your computer and use it in GitHub Desktop.

Select an option

Save aviflombaum/1331952 to your computer and use it in GitHub Desktop.
config.ru for static sites on 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)] }
@aviflombaum

Copy link
Copy Markdown
Author

Then just use:

config.ru
public/index.html
public/stylesheets
public/javascripts

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