pedestal

bobcalco 2018-12-16T21:20:05.050Z

I am using pedestal for API with a front end in re-frame/reagent. I need to have different layout for the landing page and the logged in "admin" console. I am using for routing in the front end and struggling to get its routing to play nice with pedestal's. The desired behavior is: "/" goes to a static landing page written in plain ol HTML; "/admin" goes to the portal front-end in re-frame using bidi; /api/ do what you expect. When I used the re-frame-starter project at github, it was wired to route / to the SPA, and everything that didn't start with /api was routing to the correct bidi routers. now that my app is off /admin, I can't get the :homepage route to render - just goes to Not Found, and any sub-path off /admin goes to pedestal's "not found" handler. I am not sure how to get pedestal to ignore anything off the /admin root, or to get bidi to recognize it's proper "base" url. Examples at its README all show hard-coding the whole domain root, which is not practical at all. Ideally, I'd like to use pedestal as a back end to multiple front-end SPAs so really the question is, how best to do that? I know pedestal was designed for API back ends but surely other people have gotten this to work. Any help/thoughts appreciated.

mtnygard 2018-12-16T22:01:28.050800Z

@bob592 Hi Bob. A lot of detail there... a bit hard to build the mental model from text. Are you able to pull out the routing portion into a repro case that I could look at?