Fork me on GitHub
#reitit
<
2020-03-24
>
plexus12:03:21

is there any way to use a registry for looking up handlers? I'd like to do this: ["/foobar" {:get {:handler :foo/bar}}]

plexus12:03:39

or what's the recommended way to combine pure-data route information with handler functions when using reitit-ring?

plexus13:03:47

handling it with a custom :expand function, would love to know if there's a better way

ikitommi19:03:02

been busy with work and helping kids with remote school, haven’t had time for open source - lag in handling the PRs & issues right now.

ikitommi20:03:05

@plexus there isn’t a official / documented way to do that. :expand should work and you can also map it for sequences and use sci to implement those. would be an awesome demo to have a “online routing editor” using cljs + code-mirror.

ikitommi20:03:55

at some point, there was a dicussion should the handlers too have a supporting Protocol like Interceptors & Middleware. One could attach meta-data, and :compile those ahead of time. Not sure how useful that would be, but possible.

ikitommi20:03:10

Ideas welcome.