Skip to content

Commit 570c4e2

Browse files
authored
Small environment variable improvements (#38)
* Fix twitch env vars in .env.example * Add comments to .env.example * Allow overriding twitch channels and twitch id
1 parent 1bc0135 commit 570c4e2

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.env.example

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
1-
TWITCH_CLIENT_ID=xxxxxxxxxxxxx
2-
TWITCH_CLIENT_SECRET=xxxxxxxxxx
3-
TWITCH_TOKEN_PATH=/tokens/tokens.json
1+
# Twitch API Client ID and Secret
2+
ALVEUS_CLIENT_ID=xxxxxxxxxxxxx
3+
ALVEUS_CLIENT_SECRET=xxxxxxxxxx
4+
ALVEUS_TOKEN_PATH=/tokens/tokens.json
45

6+
# Alveus Twitch Account ID for some API calls (Stream Info and Markers)
7+
#ALVEUS_TWITCH_ID=123456789
8+
9+
# Comma separated list of twitch channels to monitor
10+
#TWITCH_CHANNELS="xxx,yyy"
11+
12+
# Local OBS Websocket URL and Key
513
OBS_WS="ws://127.0.0.1:12345"
614
OBS_KEY="xxxxxxx"
715

16+
# OBS Bot Host and Port
817
OBSBOT_HOST="127.0.0.1"
918
OBSBOT_PORT=12345
1019

20+
# Courier API Key for sending messages
1121
COURIER_KEY="xxxxxxxxx"
1222

23+
# Axis
1324
AXIS_USERNAME=xxxxxx
1425
AXIS_PASSWORD=xxxxxxxx
1526

16-
AXIS_CAMERA_IP="127.0.0.1"
17-
27+
# Axis Camera IPs (see axisCameras in config)
28+
#AXIS_PASTURE_IP="georgie.local"
29+
#AXIS_GEORGIE_IP="georgie.local"
1830

31+
# Unifi
1932
UNIFI_AP_MACS="{"ee:ee:ee:ee:ee:ee":"test"}"
2033
UNIFI_IP="127.0.0.1"
2134
UNIFI_USERNAME='xxxx'

src/config/config.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
const devPrefix = process.env.NODE_ENV == 'development' ? `$` : '!';
33
const commandPrefix = devPrefix;
44

5-
const twitchChannelList = ["spacevoyage", "alveussanctuary", "alveusgg"];
5+
const twitchChannelList = process.env.TWITCH_CHANNELS ?
6+
process.env.TWITCH_CHANNELS.split(",").map((channel) => channel.trim()) :
7+
["spacevoyage", "alveussanctuary", "alveusgg"];
8+
9+
const alveusTwitchID = process.env.ALVEUS_TWITCH_ID ?
10+
Number.parseInt(process.env.ALVEUS_TWITCH_ID) :
11+
636587384;
612

7-
const alveusTwitchID = 636587384;
813
const pauseNotify = true;
914
const pauseGameChange = true;
1015
const pauseTwitchMarker = true;

0 commit comments

Comments
 (0)