fix(web): say when the dashboard is disabled

`WEB_ENABLED` not being `true` produced no output at all, so a missing site
looked exactly like a broken one and there was nothing in the console to
tell the two apart.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
nocodeandClaude Opus 5 committed 2026-09-23 23:20:07 +02:00
1 parent afcd0e55bc
commit 3bd290cba6
1 file changed
+9
+9
View File
@@ -27,6 +27,15 @@ await registerEvents(client);
const webServer = env.web.enabled ? startWebServer({ client }) : null; const webServer = env.web.enabled ? startWebServer({ client }) : null;
const webhookServer = env.webhook.enabled && !webhookSharesWebPort() ? startWebhookServer(client) : null; const webhookServer = env.webhook.enabled && !webhookSharesWebPort() ? startWebhookServer(client) : null;
// Saying nothing when the dashboard is off is how an afternoon gets lost
// looking for a site that was never asked to start.
if (!env.web.enabled) {
logger.warn(
'Le tableau de bord est désactivé : `WEB_ENABLED` ne vaut pas `true`. ' +
'Aucun site ne sera servi. Mets `WEB_ENABLED=true` dans le .env puis redémarre.',
);
}
process.on('unhandledRejection', (reason) => logger.error('Unhandled promise rejection', reason)); process.on('unhandledRejection', (reason) => logger.error('Unhandled promise rejection', reason));
process.on('uncaughtException', (error) => logger.error('Uncaught exception', error)); process.on('uncaughtException', (error) => logger.error('Uncaught exception', error));