Skip to content

Commit 384749d

Browse files
set-test-tokens: use env vars as default for secret/key/url (#256)
1 parent 80130a2 commit 384749d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎scripts/set-test-tokens.sh‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ if [[ $# -ne 0 ]]; then
5353
_fail "this script is hard-coded and does not accept arguments" 2
5454
fi
5555

56-
LIVEKIT_API_KEY="devkey"
57-
LIVEKIT_API_SECRET="secret"
56+
LIVEKIT_API_KEY="${LIVEKIT_API_KEY:-devkey}"
57+
LIVEKIT_API_SECRET="${LIVEKIT_API_SECRET:-secret}"
58+
LIVEKIT_URL="${LIVEKIT_URL:-ws://localhost:7880}"
5859
LIVEKIT_VALID_FOR="99999h"
59-
LIVEKIT_URL="ws://localhost:7880"
6060
_grant_json='{"canPublish":true,"canSubscribe":true,"canPublishData":true}'
6161

62+
echo "set_test_tokens: Using LIVEKIT_URL: $LIVEKIT_URL" >&2
63+
6264
if ! command -v lk >/dev/null 2>&1; then
6365
_fail "'lk' CLI not found. Install: https://docs.livekit.io/home/cli/" 2
6466
fi

0 commit comments

Comments
 (0)