Liking cljdoc? Tell your friends :D

inertia.middleware


location-keyclj

source

render-keyclj

source

shared-keyclj

source

wrap-inertiaclj

(wrap-inertia handler)
(wrap-inertia handler opts)

Ring middleware that serves Inertia v3 responses.

opts: :version asset version, a string or 0-arity fn :template (fn [{:keys [head body page]} req] html-string); body holds the page script and root element, head any SSR head tags :share (fn [req] props-map) of props shared by every page :errors (fn [req] errors-map); default reads (:errors (:flash req)) :flash (fn [req] flash-map); default none :id root element id, default "app" :encrypt-history? encrypt history for every page :json-encode (fn [x] json-string); default jsonista :ssr nil, or {:url .. :timeout-ms .. :on-error (fn [ex]) :default ..} :url is the full render endpoint, default http://127.0.0.1:13714/render. :default (true) says whether pages use SSR when their render call sets no :ssr option; set it false and pass {:ssr true} to render to opt pages in.

Ring middleware that serves Inertia v3 responses.

opts:
  :version      asset version, a string or 0-arity fn
  :template     (fn [{:keys [head body page]} req] html-string); `body` holds
                the page script and root element, `head` any SSR head tags
  :share        (fn [req] props-map) of props shared by every page
  :errors       (fn [req] errors-map); default reads (:errors (:flash req))
  :flash        (fn [req] flash-map); default none
  :id           root element id, default "app"
  :encrypt-history?  encrypt history for every page
  :json-encode  (fn [x] json-string); default jsonista
  :ssr          nil, or {:url .. :timeout-ms .. :on-error (fn [ex]) :default ..}
                :url is the full render endpoint, default
                http://127.0.0.1:13714/render. :default (true) says whether
                pages use SSR when their render call sets no :ssr option; set
                it false and pass {:ssr true} to `render` to opt pages in.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close