juxt

cl_j 2024-03-09T01:45:07.585479Z

When using clip, is it a good idea to extract the config and use it outside the component system? This could save some trouble of passing the parameters around.

(defonce (delay (lazy-loaded-config (read-config (io/resource "config.edn"))))

;; use lazy-loaded-config in other namespaces.

(defn -main []
  (let [system-config @lazy-loaded-config]
    (clip/start system-config)
    @(promise)))

2024-03-09T05:37:38.646739Z

very reminiscent of a program that has a lot of global variables.. usually not a great idea.

2024-03-09T05:38:07.303849Z

by keeping a system self contained, you could spin up multiple in parallel when running unit tests.

🙏 1