From a87bd7d8753a66043e2a70586e8fa36e202fadbd Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Tue, 18 Aug 2026 17:42:34 -0500 Subject: [PATCH] brightsign: say what the 8182 status listener is for on screen "status listener on 127.0.0.1:8182" told an operator a port was open and nothing about why, next to a server that advertises 8181 - it reads like a stray listener. It now says it feeds the diagnostics screen while the app is downloading, starting or down, and that nothing off-device can reach it. The port is interpolated through currentPort() rather than captured: server.env is read after this module is evaluated, so a captured value would print the 3001 default instead of the port actually serving. Verified on the device - the line renders ":8181". Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_014kfhrUPit5MCqxeTQyqr56 --- brightsign/server/bs-server-boot.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/brightsign/server/bs-server-boot.js b/brightsign/server/bs-server-boot.js index e0dec6a..cd340af 100644 --- a/brightsign/server/bs-server-boot.js +++ b/brightsign/server/bs-server-boot.js @@ -475,8 +475,15 @@ try { * last printed, which is not a thing to hand to an unauthenticated caller on a network we do * not control. */ - statusServer.listen(STATUS_PORT, '127.0.0.1', - () => remember('log', ['status listener on 127.0.0.1:' + STATUS_PORT])); + statusServer.listen(STATUS_PORT, '127.0.0.1', () => remember('log', [ + 'status listener on 127.0.0.1:' + STATUS_PORT + + ' - loopback only, it feeds THIS diagnostics screen (install progress, uptime, the log below)' + + // currentPort(), not a captured constant: server.env is read after this module is evaluated, so + // a value captured here would print the 3001 default rather than the port actually in use. + ' while the app on :' + currentPort() + ' is downloading, starting, or down. Not part of the' + + ' app; nothing' + + ' off-device can reach it.', + ])); if (statusServer.unref) statusServer.unref(); } catch (e) { remember('error', ['could not start the status listener', String(e && e.message ? e.message : e)]);