Koa middleware tha revocery the properties of a configuration service.
Nowadays ir 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.
Before use the koa-config-client is necessary configurate de 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.
-
If service is down.
-
If the url is bad formatted.
* var koa = require('koa');
* var configClient = require(koa-config-client);
* var app = new koa();
* app.use(configClient());
* configClient.property("security.audience");