Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 818 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 818 Bytes

Grøn strøm web push

This repository contains the logic for creating web push notifications describing the current emission intensity forecast to all users currently subscribed to notifications.

Configuration

In order to send messages, we need to specify an email address for the subscriber; i.e. the administrative contact of the push message, as well as a VAPID private key corresponding to the public key used when new recipients are subscribed.

Running

The simplest way to run the script is to use Docker, specifying all configuration parameters as environment variables, and a Docker volume containing the database of subscriptions.

docker build -t groenstroem-web-push .
docker run -v some_volume:/data -e [email protected] -e VAPID_KEY=... groenstroem-web-push