Read in .env file
This commit is contained in:
9
example.env
Normal file
9
example.env
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
ONLY_SHOW_AVAILABLE=true # Optional, default: true (only show available reports in the UI)
|
||||||
|
CALDAV_URL=https://example.com/calendars/ # URL to the caldav server
|
||||||
|
CALDAV_USER=USERNAME # Username for the caldav server
|
||||||
|
CALDAV_PASSWORD=PASSWORD # Password for the caldav server
|
||||||
|
CALDAV_CALENDAR=CALENDARNAME # Calendar name from the caldav server
|
||||||
|
UNTIS_SCHOOLS=School1,School2 # Comma seperated list of schools (find in URL when logging in to untis, replace + with space)
|
||||||
|
UNTIS_USERNAMES=USERNAME1,USERNAME2 # Usernames for untis schools
|
||||||
|
UNTIS_PASSWORDS=PASSWORD1,PASSWORD2 # Passwords for untis schools
|
||||||
|
UNTIS_SERVERS=server1.webuntis.com,server2.webuntis.com # Servers for untis chools
|
||||||
17
package-lock.json
generated
17
package-lock.json
generated
@@ -5,6 +5,7 @@
|
|||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"node-cron": "^3.0.2",
|
"node-cron": "^3.0.2",
|
||||||
@@ -234,6 +235,17 @@
|
|||||||
"npm": "1.2.8000 || >= 1.4.16"
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/dotenv": {
|
||||||
|
"version": "16.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
|
||||||
|
"integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/motdotla/dotenv?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ee-first": {
|
"node_modules/ee-first": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
@@ -981,6 +993,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
||||||
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
|
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
|
||||||
},
|
},
|
||||||
|
"dotenv": {
|
||||||
|
"version": "16.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
|
||||||
|
"integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ=="
|
||||||
|
},
|
||||||
"ee-first": {
|
"ee-first": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"node-cron": "^3.0.2",
|
"node-cron": "^3.0.2",
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ const moment = require('moment');
|
|||||||
const { WebUntis } = require('webuntis');
|
const { WebUntis } = require('webuntis');
|
||||||
var cron = require('node-cron');
|
var cron = require('node-cron');
|
||||||
|
|
||||||
|
require('dotenv').config();
|
||||||
|
|
||||||
// Befehl für die Skriptausführung
|
// Befehl für die Skriptausführung
|
||||||
const command = process.platform === 'win32' ? 'python' : 'python3';
|
const command = process.platform === 'win32' ? 'python' : 'python3';
|
||||||
// Pfad zum Kalender-Skript
|
// Pfad zum Kalender-Skript
|
||||||
|
|||||||
Reference in New Issue
Block a user