This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-10
Channels
- # announcements (14)
- # bangalore-clj (1)
- # beginners (89)
- # calva (166)
- # cider (33)
- # clara (12)
- # clj-kondo (1)
- # cljdoc (8)
- # clojure (101)
- # clojure-austin (1)
- # clojure-colombia (7)
- # clojure-dev (14)
- # clojure-europe (5)
- # clojure-hamburg (10)
- # clojure-italy (9)
- # clojure-nl (31)
- # clojure-spec (4)
- # clojure-uk (39)
- # clojurescript (17)
- # clojutre (3)
- # code-reviews (16)
- # cursive (72)
- # data-science (1)
- # datomic (81)
- # duct (8)
- # emacs (4)
- # figwheel-main (1)
- # graalvm (2)
- # jobs (9)
- # kaocha (21)
- # lambdaisland (2)
- # luminus (4)
- # off-topic (35)
- # re-frame (1)
- # reagent (101)
- # reitit (4)
- # ring-swagger (5)
- # shadow-cljs (17)
- # sql (40)
- # tools-deps (4)
- # vim (28)
But in Duct you don't really need a :app-db
key. Instead you should provide the reference to the db
to component that uses the db.
That's very helpful and works. I do plan on removing the (now odd) :app-db just needed to understand this part first I guess.
Trying to get the integrant ideas straight in my mental model: so from the integrant readme
{:adapter/jetty {:port 8080, :handler #ig/ref :handler/greet}
:handler/greet {:name "Alice"}}
is to {:my-namespace/my-fn-var {:my-key-in-param #ig/ref :an-integrant-key-ref}
The main idea is simple, IMO: the app will be started and the config will be transformed into the running system. Each key will be init
ed and replaced by the result of the appropriate ig/init-key
. The keys will be init
ed in such order that each component will get its dependencies init
ed.
The duct guide is the most up to date doc AFAIK https://github.com/duct-framework/docs/blob/master/GUIDE.rst
There is also articles like https://circleci.com/blog/build-a-clojure-web-app-using-duct/
But the last time I've read this article it was a bit outdated — it was using duct before 0.11
, and there were breaking changes. https://github.com/duct-framework/docs/blob/master/DESIGN-0.11.rst