diff --git a/config/SharedConfig.ts b/config/SharedConfig.ts new file mode 100644 index 0000000000000000000000000000000000000000..396b88b431b1e5db26646b1af0e66156fe089c8e --- /dev/null +++ b/config/SharedConfig.ts @@ -0,0 +1,25 @@ +class SharedConfig { + private static _instance: SharedConfig; + + public readonly production: boolean; + + public readonly logsFolder: string; + + + private constructor() { + this.production = process.env.NODE_ENV === 'production'; + + this.logsFolder = process.env.LOGS_FOLDER; + } + + public static get instance(): SharedConfig { + if ( !SharedConfig._instance ) { + SharedConfig._instance = new SharedConfig(); + } + + return SharedConfig._instance; + } +} + + +export default SharedConfig.instance;