Live reloading within Kit-clj

I’m a beginner and I just started tinkering around using kit-clj. I tried adding the middleware wrap-reload of ring.middleware.reload to

(defn wrap-base
  [{:keys [metrics site-defaults-config cookie-secret], :as opts}]
  (let [cookie-store (cookie/cookie-store {:key (.getBytes ^String
                                                           cookie-secret)})]
    (fn [handler]
      (cond-> ((:middleware env/defaults) handler opts)
        true (defaults/wrap-defaults
              (assoc-in site-defaults-config [:session :store] cookie-store))
        true (wrap-reload)
        (some? metrics) (prometheus-ring/wrap-metrics metrics)))))

in web/middleware/core but doesn’t work. How can I achieve some level of live reloading after changing files without having to execute (reset) in the user namespace all the time?

Thank you!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.