Add human-style explanatory comments in main runtime flow

This commit is contained in:
Pandipipas
2026-02-24 00:52:08 +01:00
parent fddf32905a
commit fd4a599ae0
3 changed files with 9 additions and 0 deletions
+2
View File
@@ -15,6 +15,7 @@ const MIN_TCP_PORT = 1;
const MAX_TCP_PORT = 65535;
export function getRuntimeConfig(): AppRuntimeConfig {
// Centralized defaults keep local development and packaged builds consistent.
return {
title: getEnv("SCOREKO_APP_TITLE", "Scoreko"),
userModelId: getEnv("SCOREKO_APP_USER_MODEL_ID", "com.scoreko.desktop"),
@@ -49,6 +50,7 @@ export function parseEnvInt(name: string, fallback: number): number {
}
export function parseEnvIntInRange(name: string, fallback: number, min: number, max: number): number {
// We throw here instead of silently coercing to avoid hidden misconfiguration in production.
const rawValue = process.env[name];
if (!rawValue) {
return fallback;