Pedestals routing is pretty nice but tying the routing table too much to the handlers can be annoying when trying to generate routes outside of a Pedestal server (e.g. when rendering files statically.)
This namespace lists all routes of cljdoc and exposes some utility functions to generate URLs given the routing information.
With some more work this could probably also be used from ClojureScript.
For use with http handlers a route-resolver
can be passed when
generating all routes. See docstring of routes
for details.
Pedestals routing is pretty nice but tying the routing table too much to the handlers can be annoying when trying to generate routes outside of a Pedestal server (e.g. when rendering files statically.) This namespace lists all routes of cljdoc and exposes some utility functions to generate URLs given the routing information. With some more work this could probably also be used from ClojureScript. For use with http handlers a `route-resolver` can be passed when generating all routes. See docstring of `routes` for details.
(routes route-resolver {:keys [host port scheme] :as opts})
Return the expanded routes given the opts
as passed to
io.pedestal.http.route/expand-routes
. The route-resolver
will be
used for post processing the routes, usually setting the right
interceptors.
Return the expanded routes given the `opts` as passed to `io.pedestal.http.route/expand-routes`. The `route-resolver` will be used for post processing the routes, usually setting the right interceptors.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close