refactor(server): bootstrap and middleware read config via app-config

This commit is contained in:
jubnl
2026-07-25 15:17:33 +02:00
parent e17f165e44
commit a34ab288f5
9 changed files with 45 additions and 22 deletions
+3 -2
View File
@@ -9,7 +9,8 @@
* directly here. Read at call time so tests and runtime env changes take effect
* immediately.
*/
import { readEnv } from '../../app-config';
export function pluginsEnabled(): boolean {
const v = (process.env.TREK_PLUGINS_ENABLED || '').trim().toLowerCase();
return !['false', '0', 'off', 'no'].includes(v);
return readEnv().plugins.enabled;
}