Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #91 from devinus/master
Browse files Browse the repository at this point in the history
Server index.html as root
  • Loading branch information
wagenet committed Dec 6, 2011
2 parents d66f1cc + 88dd3f1 commit 67bc55f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions bpm.gemspec
Expand Up @@ -25,6 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency "sprockets", "~> 2.0.0"
s.add_dependency "eventmachine", "~> 1.0.0.beta.4" # There are issues with 0.12.10 and thin
s.add_dependency "thin", "~> 1.2"
s.add_dependency "rack-rewrite", "~> 1.2.1"

s.add_development_dependency "rspec"
s.add_development_dependency "rack", "~> 1.3.2"
Expand Down
4 changes: 4 additions & 0 deletions lib/bpm/server.rb
@@ -1,4 +1,5 @@
require 'rack'
require 'rack-rewrite'
require 'sprockets'
require 'thin'

Expand Down Expand Up @@ -33,6 +34,9 @@ def app

@app ||= ::Rack::Builder.new do
use BPM::Rack, cur_project, :mode => cur_mode
use ::Rack::Rewrite do
rewrite /^(.*)\/$/, '$1/index.html'
end
run ::Rack::Directory.new cur_project.root_path
end.to_app
end
Expand Down

0 comments on commit 67bc55f

Please sign in to comment.