This NodeJS script automatically sends new iserv exercises to a discord webhook.
-
Download the latest NodeJS Version from https://nodejs.org/en/download/ and install it.
-
Download this repository.
git clone https://github.com/aimok04/iserv_exercise_discord_webhook/
-
Cd into the new folder and run
npm install
to install all dependencies. -
Run the main.js file with
node .
to start the setup. You will need the host and port of your IServ-Web-Server, the credentials from your IServ-Account and the link to your Discord webhook. -
Create a crontab (or something similar) to run the main.js script repeatedly.
Example:*/5 6-17 * * 1-5 cd /path/to/script/ && node .
This will execute the script every 5 minutes from 6 am to 5 pm from Monday until Friday.
You can update the project files with this command: git pull
I used two NPM packages in this script.
I don't know if this will work for every server. If you have any suggestions or questions please let me know! :)