DevStack Configuration Client
Library that revocery the properties of a configuration service.
Usage
Nowadays is really common have the configuration of your application externalized, so with this middleware you can recover in json format your properties from a configuration service as the configuration service of Spring framework.
Configuration
Before use the devstack-config-client is necessary configurate the file configuration.json, this file will be in the root of your application:
- Url of the configuration service.
- Label of the application.
- Name, application name.
- Profile of your application.
- Attempts, number of attempst in case the connection with the service fail.
- Delay, time between attempts.
- Logging, level of the logging.
{
"configService":{
"url":"https://configuration-va-vaserv-pre.appls.boae.paas.gsnetcloud.corp:443",
"label":"master",
"name":"alarms",
"profile":"default",
"attempts":3,
"delay":5000
}
}
Retrieving the property
If you want recover a property you have to pass it as parameter.
Example
var configClient = require(devstack-config-client);
configClient.property('serenity.devstack.audience');
Additional Information
If you want to use this library, you need at least node v.7 and Harmony.