Skip to content

Instantly share code, notes, and snippets.

@whatupdave
Created July 19, 2010 06:35
Show Gist options
  • Save whatupdave/481074 to your computer and use it in GitHub Desktop.
Save whatupdave/481074 to your computer and use it in GitHub Desktop.
Static site in heroku
git init
git add .
git commit -m "Initial"
heroku create <APP>
heroku addons:add custom_domains
heroku domains:add <APP>.com
heroku domains:add www.<APP>.com
git push heroku master
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