Skip to content

Configuration module for Conskit that adds environment variable support to trapperkeeper

Notifications You must be signed in to change notification settings

conskit/ck.config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ck.config Build Status Dependencies Status Clojars Project

Configuration module for conskit

Installation

Add the dependency in the clojars badge above in your project.clj.

Usage

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

License

Copyright © 2016 Jason Murphy

Distributed under the Apache License, Version 2.0.

About

Configuration module for Conskit that adds environment variable support to trapperkeeper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published