This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-10
Channels
- # beginners (40)
- # boot (307)
- # boulder-clojurians (2)
- # carry (3)
- # cljs-dev (3)
- # cljsjs (16)
- # clojure (42)
- # clojure-greece (3)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (116)
- # community-development (1)
- # component (5)
- # conf-proposals (2)
- # core-async (1)
- # crypto (2)
- # cursive (3)
- # devcards (1)
- # events (1)
- # hoplon (123)
- # om (28)
- # onyx (17)
- # pedestal (3)
- # proton (1)
- # re-frame (18)
- # reagent (26)
@mtnygard thanks for pointing out 😄 I think pedestal needs more love for docs especially for beginner like me 😄
@mtnygard I have this route def
(defn routes
[interceptor]
(route/expand-routes
`[[["/" {:get index-page}
^:interceptors [bootstrap/html-body ~interceptor]
["/api" {:post omnext-service}
^:interceptors [iinterceptor/om-body-params iinterceptor/om-response]]
["/*" {:get index-page}
^:interceptors [bootstrap/html-body ~interceptor]]]]]))
I think config it wrong, I got the error Route names are not unique
@nxqd The trouble is that both "/' and "/*" are defined to {:get index-page}. That's why they both get assigned the same route-name. Are you trying to set it up so any request that would be 404 shows the index page instead? If so, you might be better off providing a "not-found-interceptor" in your service map. See http://pedestal.io/reference/service-map for details.