An object that represents the configuration of the API. By default, configuration files are expected to be named apix.config.json.
apix.config.json
A typical config file will look like this:
{ "host": "127.0.0.1", "port": 3000, "maxRequestAge": 60000} Copy
{ "host": "127.0.0.1", "port": 3000, "maxRequestAge": 60000}
Creates a new configuration object.
The path to the configuration file. Defaults to apix.config.json.
Retrieves a value for a key.
the value to set for the key.
key in config.
value for provided key.
const port = config.valueForKey<number>(ApiXConfigKey.Port) || 3000; Copy
const port = config.valueForKey<number>(ApiXConfigKey.Port) || 3000;
An object that represents the configuration of the API. By default, configuration files are expected to be named
apix.config.json
.A typical config file will look like this: