A Simple way to send (offline) push messages (via a webhook) to every device that supports web push.
Hosted inside a cloudflare worker
or selfhost
(using miniflare).
You can even receive notifications if the app is closed or your offline(and back online again).
It comes with a offline installable pwa for all time access to your latest notifications.
see installation documentation
curl -X POST -H "Content-Type: application/json" -d '{"title":"Hello", "message":"World"}' https://yourendpoint/api/notify
optional with a icon:
curl -X POST -H "Content-Type: application/json" -d '{"title":"Hello", "message":"World", "icon": "https://via.placeholder.com/150"}' https://yourendpoint/api/notify
optional with some tags:
curl -X POST -H "Content-Type: application/json" -d '{"message": "test", "title": "1231234", "tag": ["test", "server"]}' https://yourendpoint/api/notify
if you have a server password defined you will also need to set the Authorization
header to: bearer <server_password>
for more info see the documentation
most of the webpush code is a port of simple-push-demo by gauntface