This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-16
Channels
- # adventofcode (76)
- # aleph (1)
- # aws (2)
- # beginners (101)
- # boot (1)
- # boot-dev (1)
- # calva (25)
- # cider (12)
- # cljs-dev (29)
- # clojure (214)
- # clojure-europe (1)
- # clojure-nl (5)
- # clojure-spec (1)
- # clojure-uk (6)
- # clojurescript (155)
- # data-science (1)
- # datomic (48)
- # figwheel-main (5)
- # immutant (1)
- # leiningen (11)
- # nrepl (2)
- # off-topic (24)
- # pathom (2)
- # pedestal (2)
- # portkey (8)
- # protorepl (5)
- # re-frame (2)
- # rum (4)
- # shadow-cljs (21)
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.