Liking cljdoc? Tell your friends :D

reacl-c-basics.pages.ring

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))
```

raw docstring

wrap-client-fn-routesclj

(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`.
sourceraw docstring

wrap-client-routesclj

(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`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close