[object Object]

← back to Agentabrams Viewer

chore: lint (loadDomains try/catch), (session close)

ea8bb3a6c9c081202b617412ea3d3fc484373d55 · 2026-07-25 10:55:27 -0700 · Steve

Files touched

Diff

commit ea8bb3a6c9c081202b617412ea3d3fc484373d55
Author: Steve <steve@designerwallcoverings.com>
Date:   Sat Jul 25 10:55:27 2026 -0700

    chore: lint (loadDomains try/catch),  (session close)
---
 server.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 821ce18..3900f76 100644
--- a/server.js
+++ b/server.js
@@ -18,7 +18,8 @@ const UPSTREAM_AUTH = 'Basic ' + Buffer.from(process.env.UPSTREAM_AUTH || 'admin
 const MIME = { '.html': 'text/html', '.js': 'text/javascript', '.css': 'text/css', '.json': 'application/json', '.png': 'image/png', '.svg': 'image/svg+xml' };
 
 function loadDomains() {
-  return JSON.parse(fs.readFileSync(path.join(ROOT, 'domains.json'), 'utf8'));
+  try { return JSON.parse(fs.readFileSync(path.join(ROOT, 'domains.json'), 'utf8')); }
+  catch (e) { console.error('loadDomains failed:', e.message); return []; }
 }
 
 // Server-side health probe — the browser can't check cross-origin status itself.

← 814faa8 viewer UI: 3-way status dots (Basic/login/open) + per-dot to  ·  back to Agentabrams Viewer  ·  (newest)