Demo Mode (#117)

* Adding Demo Mode to Fredy
This commit is contained in:
Christian Kellner
2024-11-22 09:11:10 +01:00
committed by GitHub
parent b3ae5f640c
commit 337ee922a6
20 changed files with 406 additions and 193 deletions

View File

@@ -4,6 +4,10 @@ import {readFile} from 'fs/promises';
import {createHash} from 'crypto';
import {DEFAULT_CONFIG} from './defaultConfig.js';
function inDevMode(){
return process.env.NODE_ENV == null || process.env.NODE_ENV !== 'production';
}
function isOneOf(word, arr) {
if (arr == null || arr.length === 0) {
return false;
@@ -72,6 +76,7 @@ export async function refreshConfig(){
await refreshConfig();
export {isOneOf};
export {inDevMode};
export {nullOrEmpty};
export {duringWorkingHoursOrNotSet};
export {getDirName};