UNPKG

srvoa

Version:

Infrastructure for service oriented architecture.

41 lines (31 loc) 1.21 kB
# Configuration The kermit service configuration system is aware of defining app dependent services, configuring these services and splitting the configuration into multiple files. ## Service Definition The dependent application services are defined in `app.services`. Each service definition of the services hash may be a service constructor or an object with the following keys: * service: **kermit.Service** (required) the service constructor * configKey: **String** (optional) the service config key A valid service definition may look like: ```js { app: { services: { srv1: Service1, srv2: { service: Service2 }, srv3: { service: Service3, configKey: 'srv3.config.key' } } } } ``` All defined services will be instantiated, configured, bootstrapped and launched during the app lifecycle. ## Service Configuration The service config key is the key that is used to read the service config from. It can be defined and overridden on different layers. * If the service provides a `getConfigKey() : String` method, the return value will be used as config key. * If not,