Useful Reitit router middlewares and helpers.
Useful Reitit router middlewares and helpers.
(create-resource-handler-cached {:keys [cached? cache-control]
:or {cached? false
cache-control DEFAULT-CACHE-30D}
:as opts})
Return resource handler with optional Cache-Control header.
Return resource handler with optional Cache-Control header.
Common exception middleware to handle all errors.
Common exception middleware to handle all errors.
(get-route router route-name)
(get-route router route-name {:keys [path query]})
Return the API route by its name, with optional path and query parameters.
Return the API route by its name, with optional path and query parameters.
(handler-ssr {:keys [routes default-handlers session-store]}
{:keys [options] :as context})
Return main application handler for server-side rendering.
Return main application handler for server-side rendering.
(render-html content)
Render hiccup content as HTML response.
Note: hiccup/hiccup is not a direct dependency of this library.
Render hiccup content as HTML response. Note: hiccup/hiccup is not a direct dependency of this library.
(wrap-context handler context)
Add system dependencies of handler to request as a context key.
Add system dependencies of handler to request as a context key.
(wrap-reload f)
Reload ring handler on every request. Useful in dev mode.
Reload ring handler on every request. Useful in dev mode.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close