pedestal

jhowd 2020-11-08T22:43:59.117700Z

does anyone have a pedestal app that uses re-frame for the frontend? I am wanting to browse a repo so I can trace though how it would work because I seem to be struggling with it on my own

simongray 2020-11-09T08:28:21.117900Z

I get the struggle (modern full-stack web development is complicated), but something like Re-frame is completely orthogonal to whatever the backend web service is written in. The only job that Pedestal (or Compojure or whatever) should have is to serve an HTML page containing your compiled JS bundle and perhaps expose 1 or more backend endpoints for data exchange. What part are you struggling with?

simongray 2020-11-09T08:30:41.118100Z

This is not Pedestal (it’s Compojure), but it might point you in the right direction: https://github.com/simongray/sino.study/blob/master/src/sinostudy/navigation/handler.clj#L73-L90 Basically, there is a single API endpoint for data exchange using Transit and then a single endpoint (a fallback endpoint for unmatched requests) which serves the HTML page itself. It also uses Compojure’s way to specify static resources as a separate “endpoint”.

jhowd 2020-11-09T17:06:59.120900Z

thank you both! This is definitely helpful and gives me a good path to start down