From a5da592fcf0578c22eef457a2f8f5ce9e41d5ffe Mon Sep 17 00:00:00 2001 From: Anais Saraiva Date: Mon, 21 Sep 2026 12:09:30 +0200 Subject: [PATCH] Update config.ts --- src/config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 4466048..a320a60 100644 --- a/src/config.ts +++ b/src/config.ts @@ -14,6 +14,10 @@ function envInt(name: string, fallback: number): number { } export const config = { + // "production" under the NixOS module / CI builds, "development" locally. + nodeEnv: env("NODE_ENV", "development"), + isProduction: env("NODE_ENV", "development") === "production", + port: envInt("PORT", 3000), host: env("HOST", "127.0.0.1"), appPassword: env("APP_PASSWORD", ""), @@ -43,7 +47,8 @@ export const config = { wikiUrl: env("WIKI_URL", "https://git.kisakay.com/k/chat/wiki"), // Per-driver debug logging to stdout ([driver:name] lines). - driverDebug: envBool("DRIVER_DEBUG", true), + // On by default in development, off unless asked for in production. + driverDebug: envBool("DRIVER_DEBUG", !env("NODE_ENV", "development")), // Local file CDN (avatars today, more namespaces tomorrow). // Dev default is a folder next to the codebase; NixOS module points it