Skip to content

Instantly share code, notes, and snippets.

View djbender's full-sized avatar
🕵️‍♂️

Derek Bender djbender

🕵️‍♂️
View GitHub Profile
require 'main'
run Sinatra::Application
gem 'rack-rewrite', '~> 1.0.0'
require 'rack/rewrite'
use Rack::Rewrite do
r301 %r{^([^\.]*[^\/])$}, '$1/'
r301 %r{^(.*\/)$}, '$1index.html'
end
use Rack::Static, :urls => ["/"], :root => Dir.pwd + '/output'
# Empty app, should never be reached: