mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 02:14:05 +00:00
refactor(server): bootstrap and middleware read config via app-config
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user