Skip to content

Instantly share code, notes, and snippets.

@davydany
Created February 17, 2017 23:45
Show Gist options
  • Select an option

  • Save davydany/d8e79340f51de8eec990ecf8f9d28636 to your computer and use it in GitHub Desktop.

Select an option

Save davydany/d8e79340f51de8eec990ecf8f9d28636 to your computer and use it in GitHub Desktop.
Serving Static Sites in Heroku
# thanks to https://github.com/stevenhaddox
# Set Our Root Path
::ROOT = File.dirname( File.expand_path( __FILE__ ) )
ENV['RACK_ENV'] ||= 'development'
require 'rubygems'
# Serve our index file by default
use Rack::Static ,
:urls => '/',
:root => 'public',
:index => 'index.html'
run Rack::Directory.new("public")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment