Skip to content

Instantly share code, notes, and snippets.

@rajiv
Created April 13, 2015 23:31
Show Gist options
  • Save rajiv/b9100fba66b9423bfd00 to your computer and use it in GitHub Desktop.
Save rajiv/b9100fba66b9423bfd00 to your computer and use it in GitHub Desktop.
static websites on heroku
# based on http://manalang.com/static-websites-with-heroku
require 'rubygems'
require 'rack/contrib'
require 'rack-rewrite'
use Rack::CommonLogger
use Rack::Static, :root => "public"
use Rack::ETag
use Rack::Rewrite do
rewrite '/', '/index.html'
end
run Rack::Directory.new('public')
source 'https://rubygems.org'
gem 'rack-contrib'
gem 'rack-rewrite'
gem 'thin'
web: bundle exec thin start -p $PORT -e $RACK_ENV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment