reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Zaymon 2021-04-25T07:19:47.165400Z

What’s the recommended way of getting dependencies into reitit handlers (when the deps are managed with Mount)

dharrigan 2021-04-25T07:20:57.165800Z

I have a small example here (which I'm currently updating)....

dharrigan 2021-04-25T07:21:21.166Z

<https://github.com/dharrigan/startrek/blob/master/src/startrek/api.clj>

dharrigan 2021-04-25T07:21:31.166400Z

a major rewrite is underway (should be done today)

dharrigan 2021-04-25T07:21:42.166700Z

but notice that I pass along the app-config into the handler

dharrigan 2021-04-25T07:21:54.167200Z

I use juxt clip, rather than mount, but the concept is the same

Zaymon 2021-04-25T07:22:02.167600Z

Nice. I guess I will just pass things all the way down.

dharrigan 2021-04-25T07:22:06.167700Z

app-config is a map containing all my deps, like database connection

✅ 1