mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 13:42:06 +00:00
Add human-style explanatory comments in main runtime flow
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user