Fork me on GitHub
#pedestal
<
2016-09-10
>
jimmy08:09:11

@mtnygard thanks for pointing out 😄 I think pedestal needs more love for docs especially for beginner like me 😄

jimmy09:09:40

@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

mtnygard15:09:48

@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.