Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.7 KB

README.md

File metadata and controls

73 lines (48 loc) · 1.7 KB

pageguardian

A simple nodejs Script to monitor a specific website URL and receive Telegram notifications whenever changes occur

Environment vars

This project uses the following environment variables:

Name Description Default Value
BOT_TOKEN Your Telgram Bot Token "*"  
CHAT_ID Your Telgram Bot Chat ID "*"  
MONITOR_URL Desired website URL to monitor changes "*"  

Pre-requisites

  • Install Node.js version 20.6.1
  • Create a Telegram Bot, e.g. using this: Tutorial
  • Install Docker (if run in a container)

Getting started

  • Clone the repository
git clone  https://github.com/niklasfrick/pageguardian.git

Running locally

  • Create a .env file and populate with your information
BOT_TOKEN="your_bot_token"
CHAT_ID="your_chat_id"
MONITOR_URL="http://example.com"
  • Install dependencies
cd pageguardian
npm install
  • Build and run the project
npm start

Running as a docker (from Docker Hub)

docker run -d --env BOT_TOKEN="your_bot_token" --env MONITOR_URL="http://example.com" --env CHAT_ID="your_chat_id" niklasfrick/pageguardian

Running as a docker (local build)

  • Build the docker image
cd pageguardian
docker build -t pageguardian .
  • Run the docker in background with passing in Variables
docker run -d --env BOT_TOKEN="your_bot_token" --env MONITOR_URL="http://example.com" --env CHAT_ID="your_chat_id" pageguardian