No description, website, or topics provided.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Simple maintenance mode inserted into your app. Enable with a the MAINTENANCE env var.

Usage in your rackup file

require 'lib/rack/maintenance'
use Rack::Maintenance

Or provide your own response:

require 'lib/rack/maintenance'
use Rack::Maintenance, [503,{'Content-Type'=>'text/html'},'public/maintenance.html')]

Running the example

With maintenance mode off:

$ cd example
$ rackup
$ curl http://localhost:9292
If you're seeing this, maintenance mode is turned off and the app is serving pages normally

$ MAINTENANCE=on rackup
$ curl http://localhost:9292
Maintenance mode on!