Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
This template shows how to quickly trigger a maintenance page using Global Config
The Maintenance Page template is a Next.js example from Vercel that demonstrates how to serve a maintenance screen from the edge using Global Config. It takes a single boolean flag stored in a Global Config store, and when that flag is true, visitors see a styled maintenance page instead of the normal application. The template runs on Vercel's Edge Middleware and is available as a one-click deploy or a local pnpm project.
isInMaintenanceMode key from a Global Config store; flipping that boolean to true or false switches between maintenance mode and normal operation without redeploying.GLOBAL_CONFIG environment variable and a store containing { "isInMaintenanceMode": true }.pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-middleware/maintenance-page.isInMaintenanceMode flag in your Global Config store to instantly show or hide the maintenance page.The template uses Vercel Edge Middleware to inspect the GLOBAL_CONFIG environment variable, which holds a connection string to your Global Config store. The middleware reads the isInMaintenanceMode flag; when it is true, the request is rewritten to a maintenance page component. The example includes instructions for both one-click deploy and local setup via create-next-app.
Yes, the one-click deploy and edge middleware features are designed for Vercel, and the demo is hosted on Vercel.
Global Config is a Vercel feature for storing runtime configuration. This template reads a boolean key from a Global Config store to decide whether to show the maintenance page.
The template uses Tailwind CSS, so you can modify the styling and content of the page component to match your brand.
