UNPKG

@angstone/monostone

Version:

monolitic event-sourced framework

24 lines 758 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // use dot env library to import the // env file and load config variables // and constants const dotenv = require("dotenv"); let defaultFilePath = `${__dirname}/../.env`; if (process.env.FRAMEWORK_ENV == 'packed') { defaultFilePath = '.env'; } /** * Loads the enviroment variables. * @param !configRecipe a recipe for configuring */ exports.config = (configRecipe) => { if (!configRecipe) { configRecipe = {}; } console.log(configRecipe.envPath); dotenv.config({ path: configRecipe.envPath || defaultFilePath }); if (configRecipe.featuresPath) process.env.FEATURES_PATH = configRecipe.featuresPath; }; //# sourceMappingURL=config.js.map