Giter Site home page Giter Site logo

dennsaja / cf-workers-maintenance.github.io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oleghalin/cf-workers-maintenance

0.0 0.0 0.0 334 KB

Cloudflare Workers & TailwindCSS Maintenance page

Home Page: https://maintenance-screen.khalin.workers.dev/

JavaScript 7.07% TypeScript 40.35% CSS 1.31% HTML 51.28%

cf-workers-maintenance.github.io's Introduction

CF Workers & TailwindCSS Maintenance application

Simple application served by Cloudflare Workers which interupts requests to your server while maintenance in progress.

Features

  • TailwindCSS
  • Cloudflare Workers
  • Easy to use npm script which enables and disables page

Deployment

To deploy this page run

npm install
npm run workers:deploy

Page Customization

You can run npm run watch and start writing your TailwindCSS classes in public/index.html.

How to enable maintenance mode?

  • Deploy your page (npm run workers:deploy)
  • Login your Cloudflare Dashboard
  • Navigate to maintenance-screen worker -> routes section
  • Enable wildcard routing for your zone (eg: domain.dev/* or *.domain.dev/*)

Done, all your traffic will be routed to maintenance page.

Enabling / Disabling screen using CLI

Configuration

  1. Add route to wrangler.toml (required for wrangler to rewrite routes after disable command) route = "domain.dev/maintanence" - define any unused url of your application
  2. Edit wrangler.enable.toml. Adjust routes parameter, by default it handles all requests to root domain and all URI's

Enabling

npm run workers:enable - deploys app && enables configured routes in wrangler.enable.toml

Disabling

npm run workers:disable - deploys app && enables configured route in wrangler.toml

Authors

Screenshots

Demo screenshot

cf-workers-maintenance.github.io's People

Contributors

dennsaja avatar oleghalin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.