Config

mdxWebApiCore.Utils. Config

Class containing Config utilities.

Constructor

new Config(inputopt)

Description:
  • Constructor is passed a destructured object as param.
Source:
Parameters:
Name Type Attributes Default Description
input Object <optional>
{} Input object.
Properties
Name Type Attributes Default Description
bootstrap Object <optional>
<nullable>
null Bootstrap config of web-api

Methods

getBootstrapObjectMap() → {Object}

Description:
  • Returns Bootstrap Config Object Map
Source:
Example
let ConfigObject = new mdx.Utils.Config({bootstrap:defaultBootstrapConfig});
let bootstrapObjectMap = ConfigObject.getBootstrapObjectMap();
Returns:
Returns an object containing bootstrap config in maps.
Type
Object

overrideBootstrapConfig(bootstrapConfig)

Description:
  • Overrides current Bootstrap Object Map
Source:
Example
let ConfigObject = new mdx.Utils.Config({bootstrap:defaultBootstrapConfig});
const bootstrapConfig = require(bootstrapConfigPath); // bootstrapConfigPath is the path to file which has the values provided by user.
ConfigObject.overrideBootstrapConfig(bootstrapConfig);
Parameters:
Name Type Description
bootstrapConfig Object