Skip to content

Instantly share code, notes, and snippets.

@dapicester
Created June 6, 2016 02:23
Show Gist options
  • Save dapicester/3b36362a9fc16c138173eedccafe0bfa to your computer and use it in GitHub Desktop.
Save dapicester/3b36362a9fc16c138173eedccafe0bfa to your computer and use it in GitHub Desktop.
Rack fallback for maintenance
require_relative 'offline'
run Sinatra::Application
require 'sinatra'
get '/' do
haml :index
end
get '/*' do
redirect to '/'
end
__END__
@@ layout
%html
%head
%title Oops
%beta
= yield
@@ index
%h1 Oops
%p The site is no longer available!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment