Get build configuration
Use building configuration from configuration files
As mentioned on the configuration under cli, we can define configuration which will be injected during build time(only when building using Sugoi/cli).
All of the passed configuration is stored under the configuration container of @sugoi/core in a map where the key is the name of the file (without suffix) and the value is the object the file contained.
For resolving the configuration both @sugoi/core and @sugoi/server expose the
getConfiguration(configurationKey?: string)
method, when no argument pass the entire configuration map will return.import { getConfiguration } from '@sugoi/core';
const deploymentVars = getConfiguration('deployment_variables');
Logger.setDebugLevel(deploymentVars.debugLevel);
import { getConfiguration } from '@sugoi/server';
const deploymentVars = getConfiguration('deployment_variables');
Logger.setDebugLevel(deploymentVars.debugLevel);
Last modified 4yr ago