Send SSE when files change

ssentr

Send SSE when files change.

Setup:

$ cat Caddyfile
http://localhost:8085
route /reload {
	header Access-Control-Allow-Origin *
	header Access-Control-Request-Method GET
    reloader
}

Usage:

find -iname '*.html' | ssentr run

Add the following hyperscript to your project

<script type="text/hyperscript">
eventsource Reloader from http://localhost:8085/reload
    on message
        call location.reload()
    end
    on error
        log "error with connecting to reload SSE"
    end
    on close
        log "closing reload SSE"
    end
end
</script>

When any of the files change, a message will be sent to any connection to http://localhost:8085/reloader

Credit

Based on and is an extension of Caddy Inspired by entr(1) Used along with hyperscript

Similar Resources

Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

Mar 27, 2022

Run a command when files change

Reflex Reflex is a small tool to watch a directory and rerun a command when certain files change. It's great for automatically running compile/lint/te

Dec 29, 2022

Run commands when files change.

Run commands when files change.

Crow crow is a simple command-line utility that lets you run arbitrary commands when certain files change. Demo A demonstration of crow being used to

Nov 22, 2022

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

Dec 29, 2022

Split multiple Kubernetes files into smaller files with ease. Split multi-YAML files into individual files.

kubectl-slice: split Kubernetes YAMLs into files kubectl-slice is a neat tool that allows you to split a single multi-YAML Kubernetes manifest into mu

Jan 3, 2023

Change the color of console text.

go-colortext package This is a package to change the color of the text and background in the console, working both under Windows and other systems. Un

Oct 26, 2022

A program to build, run, and restart a Go program on code change

devrun A program to build, run, and restart a Go program on code change. It also supports watching all your Go imports too. So if you change the code

Apr 4, 2022

Change the color of console text.

go-colortext package This is a package to change the color of the text and background in the console, working both under Windows and other systems. Un

Oct 26, 2022

DockerSlim (docker-slim): Don't change anything in your Docker container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)

DockerSlim (docker-slim): Don't change anything in your Docker container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)

Minify and Secure Docker containers (free and open source!) Don't change anything in your Docker container image and minify it by up to 30x making it

Dec 27, 2022

Open Source runtime tool which help to detect malware code execution and run time mis-configuration change on a kubernetes cluster

Open Source runtime tool which help to detect malware code execution and run time mis-configuration change on a kubernetes cluster

Kube-Knark Project Trace your kubernetes runtime !! Kube-Knark is an open source tracer uses pcap & ebpf technology to perform runtime tracing on a de

Sep 19, 2022

Knative Controller which emits cloud events when Knative Resources change state

Knative Sample Controller Knative sample-controller defines a few simple resources that are validated by webhook and managed by a controller to demons

Oct 2, 2021

A CLI tool to change monitor settings over USB to the Gigabyte M32U

Gigabyte Monitor control Introduction A CLI tool to change monitor settings over USB to the Gigabyte M32U Supported monitors Gigabyte M32U In theory a

Dec 30, 2022

A decentralized, cryptocurrency platform that can change this world!

Go Detonus Official Golang implementation of the Detonus protocol. Building the source For prerequisites and detailed build instructions please read t

Oct 19, 2021

A helm plugin that shows a diff explaining what a helm upgrade would change

A helm plugin that shows a diff explaining what a helm upgrade would change

Helm Diff Plugin This is a Helm plugin giving your a preview of what a helm upgrade would change.

Jan 4, 2023

Fast, zero config web endpoint change monitor

Fast, zero config web endpoint change monitor

web monitor fast, zero config web endpoint change monitor. for comparing responses, a selected list of http headers and the full response body is stor

Nov 17, 2022

Demo of schema change failures with SQLite INTEGERs.

SQLite Schema Migration Bug This is a repository to reproduce a bug with Ent and the modernc.org/sqlite (non-CGO) SQLite 3 driver. Reproduce Simply ru

Dec 9, 2021

Web-based, zero-config, dependency-free database schema change and version control tool for teams

Web-based, zero-config, dependency-free database schema change and version control tool for teams

Live Demo • Install • Help • Development • Design Doc Bytebase is a web-based, zero-config, dependency-free database schema change and version control

Jan 1, 2023

Git-reviewers - Find out who are the best reviewers for a given change.

git-reviewers Figure out who would be a good reviewer for a change. There are two places checked when determining reviewers: The results of git blame

Jan 10, 2022
Related tags
Send slack notifications using Github action

Slack notification This is a simple Slack notification action which runs using a Bot token. Example Action A simple example on how to use this action:

Aug 9, 2021
A script written to automatically send whatsapp messages

whatsapp-auto-message A script written to automatically send whatsapp messages Config Dosyasını Ayarlama { "numbers": "phone_numbers.txt", "sleep": 2,

Jul 21, 2022
cisasntyi: check iphone stock and send notification to your iphone

for buy iphone 13 notification cisasntyi: check iphone stock and send notification to your iphone install Bark app in your iphone first before you run

Aug 3, 2022
Golang tool to send notifications to LINE app
Golang tool to send notifications to LINE app

Golang tool to send notifications to LINE app

Nov 9, 2022
ntfy is a super simple pub-sub notification service. It allows you to send desktop notifications via scripts.

ntfy ntfy (pronounce: notify) is a super simple pub-sub notification service. It allows you to send desktop and (soon) phone notifications via scripts

Jan 9, 2023
Send messages to icq-chatid when new order arrive

Получить номер последнего заказа, способ оплаты, способ доставки SELECT virtuemart_order_id FROM ce7l3_virtuemart_orders ORDER BY virtuemart_order_id

Dec 22, 2021
Korero - Send, recieve and manage messages on multiple platforms

Korero: Send, recieve and manage messages on multiple platforms Korero is a term

Jun 22, 2022
An little library to create notification files with golang.

notifile With this no library you can easily create notification files for your Go projects. These must then be stored in the directory you specify so

Oct 5, 2022
Node is where client will send data to, create block send to miner, create block send to parent and receive tick from validator and do validate

Node Receive Tick from validator Validate POH of tick send result to validator Receive confirm block from validator Send Checked block to validator Ho

Dec 31, 2021
Ipctl - Listen to IP change and change your DNS' records dynamically

ipctl Listen to IP change and change your DNS' records dynamically Table of cont

Feb 17, 2022