https://github.com/knutkirkhorn/covid-19-incidence-notifier
🤒⏰ Get notified about new COVID-19 incidences in your location (Norway only)
https://github.com/knutkirkhorn/covid-19-incidence-notifier
cases covid-19 covid19 docker incidence nodejs notification notifier
Last synced: 3 months ago
JSON representation
🤒⏰ Get notified about new COVID-19 incidences in your location (Norway only)
- Host: GitHub
- URL: https://github.com/knutkirkhorn/covid-19-incidence-notifier
- Owner: knutkirkhorn
- License: mit
- Created: 2021-02-06T20:08:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-03T18:28:01.000Z (over 2 years ago)
- Last Synced: 2025-03-24T17:53:16.649Z (7 months ago)
- Topics: cases, covid-19, covid19, docker, incidence, nodejs, notification, notifier
- Language: JavaScript
- Homepage:
- Size: 270 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# covid-19-incidence-notifier
> 🤒⏰ Get notified about new COVID-19 incidences in your location (Norway only)
[](https://hub.docker.com/r/knutkirkhorn/covid-19-incidence-notifier) [](https://hub.docker.com/r/knutkirkhorn/covid-19-incidence-notifier)
Notifies on Discord if there are new COVID-19 incidences in your location (Norway only). Uses the [Corona API](https://redutv-api.vg.no/corona/v1/) from [vg.no](https://www.vg.no/) about incidences in municipalities. It notifies to a Discord channel using [Discord Webhooks](https://discord.com/developers/docs/resources/webhook).
## Usage
### Within a Docker container
#### From Docker Hub Image
This will pull the image from [Docker Hub](https://hub.docker.com/) and run the image with the provided configuration for web hooks as below. One can provide only the Webhook URL or both the Webhook ID and token.
```sh
# Providing Discord Webhook URL
$ docker run -d -e DISCORD_WEBHOOK_URL= knutkirkhorn/covid-19-incidence-notifier
# Providing a single area ID
$ docker run -d \
-e DISCORD_WEBHOOK_URL= \
-e AREA_IDS=1577 \
knutkirkhorn/covid-19-incidence-notifier
# Providing two area IDs
$ docker run -d \
-e DISCORD_WEBHOOK_URL= \
-e AREA_IDS=1577,4651 \
knutkirkhorn/covid-19-incidence-notifier
```
#### From source code
```sh
# Build container from source
$ docker build -t covid-19-incidence-notifier .
# Run the built container with default configuration
$ docker run -d -e DISCORD_WEBHOOK_URL= covid-19-incidence-notifier
# Providing a single area ID
$ docker run -d \
-e DISCORD_WEBHOOK_URL= \
-e AREA_IDS=1577 \
covid-19-incidence-notifier
# Providing two area IDs
$ docker run -d \
-e DISCORD_WEBHOOK_URL= \
-e AREA_IDS=1577,4651 \
covid-19-incidence-notifier
```
### Outside of a Docker container
```sh
# Install
$ npm install
# Run
$ npm start
```
### Environment variables
Provide these with the docker run command or store these in a `.env` file. Only `DISCORD_WEBHOOK_URL` or both `DISCORD_WEBHOOK_ID` and `DISCORD_WEBHOOK_TOKEN` are required, but other values are recommended to change to its own personal usage.
- `DISCORD_WEBHOOK_URL`
- URL to the Discord Webhook containing both the ID and the token
- Format: `DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks//`
- `DISCORD_WEBHOOK_ID`
- ID for the Discord Webhook
- `DISCORD_WEBHOOK_TOKEN`
- Token for the Discord Webhook
- `WAIT_TIMEOUT` ***(optional)***
- The time interval in milliseconds between each check to the APIs.
- Default: `3600000` (60 minutes)
- `AREA_IDS` ***(optional)***
- The area ID(s) of the municipality/municipalities to notify about new incidences. Specified as a single four digit number or comma separeted list of four digit numbers.
- Default: `1577` (Volda)
- Different municipality IDs can be viewed [here](https://redutv-api.vg.no/corona/v1/areas/municipalities/).