This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-19
Channels
- # bangalore-clj (2)
- # beginners (217)
- # boot (3)
- # cider (130)
- # cljs-dev (117)
- # cljsrn (11)
- # clojure (99)
- # clojure-china (1)
- # clojure-denver (1)
- # clojure-dev (22)
- # clojure-italy (30)
- # clojure-norway (5)
- # clojure-russia (13)
- # clojure-sanfrancisco (3)
- # clojure-spec (74)
- # clojure-uk (107)
- # clojurescript (40)
- # clr (6)
- # core-async (25)
- # core-logic (4)
- # cursive (1)
- # data-science (1)
- # datomic (62)
- # duct (11)
- # editors (14)
- # figwheel (3)
- # fulcro (12)
- # funcool (1)
- # garden (12)
- # graphql (19)
- # jobs (4)
- # jobs-rus (1)
- # lein-figwheel (1)
- # leiningen (12)
- # luminus (5)
- # off-topic (45)
- # onyx (12)
- # other-languages (1)
- # parinfer (5)
- # programming-beginners (3)
- # re-frame (113)
- # reagent (63)
- # remote-jobs (10)
- # ring-swagger (1)
- # shadow-cljs (31)
- # slack-help (3)
- # spacemacs (27)
- # specter (1)
- # unrepl (44)
- # yada (16)
We have a project that uses the old Duct with Component, were we use bindings to bind env vars from the env https://github.com/akvo/akvo-lumen/blob/develop/backend/src/akvo/lumen/main.clj#L16 & https://github.com/akvo/akvo-lumen/blob/develop/backend/src/akvo/lumen/config.clj#L21
or how to map from external env vars to an internal naming scheme for vars (in a single map)?
if the former, you do it as part of the config map:
:some-key {:some-var #duct/env ["EXTERNAL_NAME" <Some Coercing Function> :or "some-default"]}
if you want to build a map of all env vars that you can pass around as a whole, you could simply repeat the pattern above:
:my-env-map {:a #duct/env [..] :b #duct/env [..] :c #duct/env [..] ..}
and then pass the env map to other components through refs: :some-other-component {:envs #ig/ref :my-env-map}