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
@@ -6,6 +6,8 @@
* Off by default — the generated spec enumerates every route including the
* admin surface, so exposing it is an explicit self-hoster decision.
*/
import { readEnv } from '../../app-config';
export function apiDocsEnabled(): boolean {
return (process.env.TREK_API_DOCS_ENABLED || '').trim().toLowerCase() === 'true';
return readEnv().http.apiDocsEnabled;
}