Skip to content

Commit c822c70

Browse files
committed
Build up reitit router/handler on every request
This is for easier interactive development: re-evaluating the routes file should now be enough to see any changes to the routed. Not ideal for production but we'll improve that later.
1 parent 41f3476 commit c822c70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/clojurians_log/application.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
(component/system-map
2929
:config (->ValueComponent (atom cfg))
3030
:routes (-> (new-endpoint (fn [endpoint]
31-
(let [router (reitit.ring/router routes/routes)
32-
handler (reitit.ring/ring-handler router)]
33-
(fn [request]
31+
(fn [request]
32+
(let [router (reitit.ring/router routes/routes)
33+
handler (reitit.ring/ring-handler router)]
3434
(handler (assoc request
3535
:endpoint endpoint
3636
:config cfg

0 commit comments

Comments
 (0)