UNPKG

@fdm-monster/server

Version:

FDM Monster is a bulk OctoPrint, Klipper, PrusaLink and BambuLab manager to set up, configure and monitor 3D printers. Our aim is to provide neat overview over your farm.

22 lines (21 loc) 685 B
import { AppConstants } from "../../server.constants.js"; import { getEnvOrDefault } from "../../utils/env.utils.js"; //#region src/services/core/config.service.ts var ConfigService = class { get(key, defaultValue) { return getEnvOrDefault(key, defaultValue); } getOrThrow(key) { if (!this.get(key)) throw new Error(`Environment variable with key ${key} was not defined.`); } isDemoMode() { return this.get(AppConstants.OVERRIDE_IS_DEMO_MODE, "false") === "true"; } instanceLabel() { const raw = this.get(AppConstants.INSTANCE_LABEL, "")?.trim(); return raw?.length ? raw : null; } }; //#endregion export { ConfigService }; //# sourceMappingURL=config.service.js.map