Fork me on GitHub
#pedestal
<
2018-11-27
>
ccann18:11:16

a couple quick takeaways on my beginner experience with pedestal (not with clojure, just pedestal) - I found it hard to debug constraints. When my request 404'ed because a query param constraint in a parent route (using terse syntax) didn’t match for a child route that doesn’t use that query param I was confused. I understand how they work now. I ended up pretty printing the routes in full form to see the constraints on the route and it clicked. - as mentioned previously, the :io.pedestal.http/host key defaulting to something more restrictive than 0.0.0.0 was surprising coming from having used jetty before with compojure - It took me a bit to find a doc that said defroutes is preferred over expand-routes except in the case where you need to dynamically create routes - I’m not entirely sure what the scheme, host, port etc. optional args in the route syntax do and how they interact with the server config - it wasn’t immediately obvious to me that you can use a ring handler as an interceptor without explicitly using interceptor or the map form

jvtrigueros19:11:42

Thanks for the summary, I had a very similar experience to yours. I've been using Clojure for a while, but recent user of Pedestal.