Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

atst/stack-backstage

Repository files navigation

Atst/StackBackstage

A Stack middleware for displaying maintenance pages.

The middleware takes a path, if a file exists at that path, it's contents are returned with a 503 status code.

Example

<?php

$app = new Silex\Application();

$app->get('/', function () {
    return 'my app is working';
});

$stack = (new Stack\Builder())
    ->push('Atst\StackBackstage', __DIR__.'/maintenance.html');

$app = $stack->resolve($app);

Usage

When you need to take the site down for maintenance

$ echo "<h1>Down for Maintenance</h1>" > /path/to/your/app/maintenance.html

Inspiration

Ported from rack/rack-contrib

About

A stack middleware for displaying maintenance pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages