This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-30
Channels
- # announcements (15)
- # beginners (99)
- # boot (15)
- # cider (105)
- # cljdoc (2)
- # cljs-dev (17)
- # clojure (132)
- # clojure-conj (1)
- # clojure-dev (5)
- # clojure-italy (19)
- # clojure-losangeles (2)
- # clojure-nl (20)
- # clojure-spec (70)
- # clojure-uk (50)
- # clojurescript (153)
- # core-logic (9)
- # cryogen (4)
- # cursive (6)
- # datomic (40)
- # duct (5)
- # figwheel-main (10)
- # fulcro (245)
- # hoplon (1)
- # jobs (3)
- # leiningen (12)
- # mount (8)
- # nrepl (11)
- # off-topic (1)
- # pathom (16)
- # pedestal (3)
- # planck (17)
- # re-frame (3)
- # reitit (8)
- # shadow-cljs (64)
- # spacemacs (3)
- # specter (20)
- # tools-deps (21)
can anyone recommend a good approach for different boundary extend-protocol implementations for dev vs prod? I'd like to use one type of datastore in dev vs a different one in prod. github search reveals something like https://github.com/TechEmpower/FrameworkBenchmarks/blob/82eadc9dce3badda758f9f9cbb0ff2bcdec15002/frameworks/Clojure/duct/src/hello/boundary/world_db.clj and https://github.com/wbtcb/anti-fraud/blob/508c7e7eb914a06da1366c95cece84e1d3d91033/src/antifraud/boundaries/sms.clj -- but would prefer not to include all impl in a single file. even better if the dev impl doesn't get included in prod build
I toyed around with putting the dev impl in dev/src/* and (load)'ing in dev/src/dev.clj but that way seems to break (reset)
Ensure dev/src
is a specified source-path in project.clj
for the dev
profile; then you could have the appropriate namespace under dev/src
. In that namespace have an integrant init-key defmethod (`ig/init-key ..`) to construct your dev-implementation. In the development config map (`dev.edn`, believe it is under dev/resources/dev.edn
), add the appropriate key-value pair that you would normally use in the config.edn
. Unless your duct configuration is different from the current template, dev.edn
will be merged into config.edn
, which means your dev-implementation should be swapped into the system.