Fork me on GitHub
#pedestal
<
2017-08-30
>
slpssm12:08:51

Actually, I wouldn’t mind knowing the answer to this. Is it possible to set a base path?

mtnygard16:08:13

Hi @slpssm. It’s not possible to set a base path directly, in the way that you’re asking. But, if you can get to the route data structure before creating the server (or calling expand-routes directly) then you can use ordinary Clojure data functions to manipulate the routes.

mtnygard16:08:26

For example, with table route syntax, the path is the first part of every route so you could map (update 0 #(str base %)) across the table.

slpssm18:08:19

@mtnygard Yup! That’s exactly what I did. 🙂