Skip to content

Commit

Permalink
Basic Rack app for serving static files out of /public.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfe committed Jan 27, 2010
1 parent 1dd739e commit 0e84dd0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
@@ -0,0 +1 @@
gem 'rack-rewrite'
12 changes: 12 additions & 0 deletions config.ru
@@ -0,0 +1,12 @@
# Static site using Rack (with expire headers and etag support)... great for hosting static sites on Heroku
# From: http://manalang.com/static-websites-with-heroku

require File.dirname(__FILE__) + '/vendor/gems/environment'
Bundler.require_env
require 'rack-rewrite'

use Rack::Rewrite do
rewrite '/', '/index.html'
end

run Rack::Directory.new('public')

0 comments on commit 0e84dd0

Please sign in to comment.