Skip to content

borot/rack_maintenance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rack_Maintenance, for your maintenance

What's this?

Rack_Maintenance is a rack middleware to show maintenance page while you maintenance application.

Installation

gem install rack_maintenance

How to use

####basic usage

#config.ru
require 'rack/maintenance'
use Rack::Maintenance

####set template page to show

#config.ru
require 'rack/maintenance'
use Rack::Maintenance,
  template: File.read('path/to/maintenance.html')

####set inactivate

#config.ru
require 'rack/maintenance'
use Rack::Maintenance,
  template: File.read('path/to/maintenance.html'),
  activate: false

An 'activate' option is default to true and maintenance page will be displayed. When it set to false,Rack::Maintenance is not work.

####set status code if you wish to. (default to 503)

#config.ru
require 'rack/maintenance'
use Rack::Maintenance,
  status: 200,
  template: File.read('path/to/maintenance.html'),

Although status code can be changed, there are almost no need to do so.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages