Merge pull request #17 from michaelmcgary2008/claude/no-campus-defaults
No campus's address ships in the repo
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -129,7 +129,7 @@ modules/<id>/
|
||||
"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": {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 };
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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://<prodcom-host>:24480` |
|
||||
| `port` | Port this listener serves on (default `24481`) |
|
||||
| `apiKey` | Only needed if PSK auth is enabled in ProdCom settings |
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"prodcomUrl": "http://10.3.11.152:24480",
|
||||
"prodcomUrl": "",
|
||||
"port": 24481,
|
||||
"apiKey": ""
|
||||
}
|
||||
|
||||
@@ -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://<prodcom-host>:24480');
|
||||
process.exit(1);
|
||||
}
|
||||
const target = new URL(PRODCOM_URL);
|
||||
const PUBLIC_DIR = path.join(__dirname, 'public');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user