Functions to help serving the client code in a ring server of a so called single page application for all routes handled on the client side.
After defining the routes (in a 'cljc' file):
(routes/defroutes my-app
(routes/defroute home "/"))
you can create a ring handler that serves the client html with a suitable ring response:
(-> handler
(wrap-client-routes my-app response))
Functions to help serving the client code in a ring server of a so called single page application for all routes handled on the client side. After defining the routes (in a 'cljc' file): ``` (routes/defroutes my-app (routes/defroute home "/")) ``` you can create a ring handler that serves the client html with a suitable ring response: ``` (-> handler (wrap-client-routes my-app response)) ```
(wrap-client-fn-routes handler routes client-fn)
A ring middleware that returns (client-fn route & route-args)
for
the given routes
.
A ring middleware that returns `(client-fn route & route-args)` for the given `routes`.
(wrap-client-routes handler routes client)
A ring middleware that returns the same response (the client
) for
the given routes
.
A ring middleware that returns the same response (the `client`) for the given `routes`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close