duct

2019-09-10T09:11:50.055500Z

:watchdude.state/app-db {:db #ig/ref :duct.database/sql}

2019-09-10T09:29:14.057300Z

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.

bocaj 2019-09-10T17:06:25.058500Z

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.

bocaj 2019-09-10T17:09:51.060300Z

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}

2019-09-10T20:01:24.063Z

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 inited and replaced by the result of the appropriate ig/init-key. The keys will be inited in such order that each component will get its dependencies inited.

2019-09-10T20:02:01.063600Z

The duct guide is the most up to date doc AFAIK https://github.com/duct-framework/docs/blob/master/GUIDE.rst

2019-09-10T20:03:31.064200Z

There is also articles like https://circleci.com/blog/build-a-clojure-web-app-using-duct/

2019-09-10T20:05:30.065700Z

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