Created
February 17, 2017 23:45
-
-
Save davydany/d8e79340f51de8eec990ecf8f9d28636 to your computer and use it in GitHub Desktop.
Serving Static Sites in Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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