Configuration module for conskit
Add the dependency in the clojars badge above in your project.clj
.
Add the following to your bootstrap.cfg
:
ck.config/config-service
Add the dependency in your serivice and call the get-in-config
method where needed.
(defservice
my-service
[[:EnvironmentConfigService register-hanlder!]]
(init [this context]
...
(get-in-config [:some :config :keys])
...))
get-in-config
works similar to what is provided by TrapperKeeper's :ConfigService
but adds support for
environment variables. Any configuration string value prefixed with "ENV_"
will be treated as an environment
variable and resolved once the service initializes
Copyright © 2016 Jason Murphy
Distributed under the Apache License, Version 2.0.