diff --git a/CLAUDE.md b/CLAUDE.md index 655a735..add112a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -44,7 +44,7 @@ title-bar controls). The rules that matter most: - `prodcom-listener/` — live ProdCom transcript web app. Zero-dependency Node `server.js` that serves `public/` and proxies `/prodcom/*` (including the SSE transcript stream) to the ProdCom API at `config.json → prodcomUrl` - (default `http://10.3.11.152:24480`). Good reference for: SSE handling, + (set per site; each campus runs its own). Good reference for: SSE handling, reconnect logic, channel colors/filtering, PWA install. - `band-lineup-display/` — backstage Electron app (stage lineup photos with mic/pack labels) plus ProPresenter Now/Next: diff --git a/SPEC.md b/SPEC.md index 048af6b..f72cbd6 100644 --- a/SPEC.md +++ b/SPEC.md @@ -129,7 +129,7 @@ modules// "minSize": { "w": 2, "h": 2 }, "defaultSize": { "w": 4, "h": 3 }, "configSchema": { - "prodcomUrl": { "type": "string", "label": "ProdCom URL", "default": "http://10.3.11.152:24480" }, + "prodcomUrl": { "type": "string", "label": "ProdCom URL", "default": "" }, "apiKey": { "type": "password", "label": "API key (if PSK auth enabled)", "default": "" } }, "instanceSchema": { diff --git a/modules/prodcom-transcript/module.json b/modules/prodcom-transcript/module.json index 55c4e04..2fecb62 100644 --- a/modules/prodcom-transcript/module.json +++ b/modules/prodcom-transcript/module.json @@ -1,7 +1,7 @@ { "id": "prodcom-transcript", "name": "ProdCom", - "version": "1.3.0", + "version": "1.3.1", "proddash": ">=1.1.0", "description": "Live ProdCom transcript", "permissions": [ @@ -26,9 +26,10 @@ "type": "endpoint", "label": "ProdCom server", "default": { - "host": "10.3.11.152", + "host": "", "port": 24480 - } + }, + "help": "The ProdCom server at THIS location — every campus has its own. Blank until you set it, so a new install never reads another campus's comms." }, "apiKey": { "type": "password", diff --git a/modules/prodcom-transcript/server.js b/modules/prodcom-transcript/server.js index 3d9531f..73b40f0 100644 --- a/modules/prodcom-transcript/server.js +++ b/modules/prodcom-transcript/server.js @@ -269,6 +269,9 @@ module.exports = { streams, health() { if (status.state === 'ok') return { status: 'ok', message: `Live — ${channels.length} channel${channels.length === 1 ? '' : 's'}, ${entries.size} entries` }; + // Nothing to connect to is a setting that is missing, not a link that + // is coming up — it reads red, like the other modules say it. + if (!target) return { status: 'error', message: status.message }; return { status: status.state === 'error' ? 'error' : 'connecting', message: status.message }; }, }; diff --git a/prodcom-listener/README.md b/prodcom-listener/README.md index 38ddbdc..f2adc31 100644 --- a/prodcom-listener/README.md +++ b/prodcom-listener/README.md @@ -38,7 +38,7 @@ Edit [config.json](config.json): | Key | Meaning | | --- | --- | -| `prodcomUrl` | Where the ProdCom API lives (default `http://10.3.11.152:24480`) | +| `prodcomUrl` | Where the ProdCom API lives — set it per site, e.g. `http://:24480` | | `port` | Port this listener serves on (default `24481`) | | `apiKey` | Only needed if PSK auth is enabled in ProdCom settings | diff --git a/prodcom-listener/config.json b/prodcom-listener/config.json index d3ff07e..60fb5f3 100644 --- a/prodcom-listener/config.json +++ b/prodcom-listener/config.json @@ -1,5 +1,5 @@ { - "prodcomUrl": "http://10.3.11.152:24480", + "prodcomUrl": "", "port": 24481, "apiKey": "" } diff --git a/prodcom-listener/server.js b/prodcom-listener/server.js index a3cd2b1..937ed5b 100644 --- a/prodcom-listener/server.js +++ b/prodcom-listener/server.js @@ -23,10 +23,15 @@ try { console.warn('config.json not found or invalid, using defaults/env vars'); } -const PRODCOM_URL = process.env.PRODCOM_URL || cfg.prodcomUrl || 'http://10.3.11.152:24480'; +const PRODCOM_URL = process.env.PRODCOM_URL || cfg.prodcomUrl || ''; const PORT = Number(process.env.PORT || cfg.port || 24481); const API_KEY = process.env.PRODCOM_API_KEY || cfg.apiKey || ''; +if (!PRODCOM_URL) { + console.error('No ProdCom API configured. Set prodcomUrl in config.json (or the PRODCOM_URL'); + console.error('environment variable) to this site\'s ProdCom, e.g. http://:24480'); + process.exit(1); +} const target = new URL(PRODCOM_URL); const PUBLIC_DIR = path.join(__dirname, 'public');