Skip to content

Commit eece68e

Browse files
committed
chore(viewer): add dev:live:token convenience script with baked-in dev token
Adds an optional script for quick local LAN testing without having to set RECORDING_VIEWER_TOKEN manually. Token value is intentionally noisy ('dev-only-do-not-use-in-prod') and the README warns it must not be used for studies or public networks. dev:live (env-var required) is unchanged.
1 parent 678097a commit eece68e

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

recording-viewer/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ cd artemis-extension/recording-viewer
1818
npm run dev:live
1919
```
2020

21+
#### Quick local testing
22+
23+
For fast iteration on the same network without picking a token, use the
24+
convenience script with a baked-in token:
25+
26+
```bash
27+
npm run dev:live:token # token = dev-only-do-not-use-in-prod
28+
```
29+
30+
Do NOT use this in a real study or on a shared/public network. The token is in
31+
the repo, so anyone with source access knows it. Use `dev:live` with a real
32+
random token for anything that matters.
33+
2134
### Connect (observer laptop)
2235

2336
Open `http://<recording-laptop-IP>:5173` in any browser. Enter the token.

recording-viewer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"dev": "vite",
88
"dev:live": "node -e \"if(!process.env.RECORDING_VIEWER_TOKEN){console.error('RECORDING_VIEWER_TOKEN must be set');process.exit(1)}\" && vite",
9+
"dev:live:token": "RECORDING_VIEWER_TOKEN=dev-only-do-not-use-in-prod vite",
910
"build": "tsc -b && vite build",
1011
"lint": "eslint .",
1112
"preview": "vite preview",

0 commit comments

Comments
 (0)