new Config()
- Version:
-
- 0.1.0
- Since:
-
- 0.0.1
Members
-
<static> app :string
-
Application instance name.
Type:
- string
- Since:
-
- 0.0.1
-
<static> filename :string
-
Absolute path to the main configuration file.
Type:
- string
- Since:
-
- 0.0.1
-
<static> nodenv :string
-
Execution node environnement.
Type:
- string
- Since:
-
- 0.0.1
-
<static> nodenvprfx :string
-
Execution node environnement short name. Can be [staging|test|development]
Type:
- string
- Version:
-
- 0.1.0
- Since:
-
- 0.0.1
-
<static> rootDir :string
-
Property application exec root directory. It is not necessary the same as npm/git package application root directory).
Type:
- string
- Since:
-
- 0.0.1
Methods
-
<static> get(key)
-
Method to get the value of a configuration parameter.
Parameters:
Name Type Description keystring The key of the parameter.
- Since:
-
- 0.0.1
- See:
Returns:
The value of the parameter.
- Type
- string | number | object
-
<static> initialize()
-
Method to initialize the application configuration.
- Version:
-
- 0.1.0
- Since:
-
- 0.0.1
Returns:
- Type
- void
-
<static> save( [callback])
-
Method to save the configuration to files.
Parameters:
Name Type Argument Description callbackfunction <optional>
A callback to call after file saving.
- Since:
-
- 0.0.1
- See:
Returns:
- Type
- void
-
<static> set(key, value)
-
Method to set the value of a configuration parameter.
Parameters:
Name Type Description keystring The key of the parameter.
valuestring | number | object The value of the parameter.
- Since:
-
- 0.0.1
- See:
Returns:
- Return Config instance to allow chaining.
- Type
- Config
Documentation