reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
dangercoder 2020-07-25T12:45:33.348200Z

Does reitit do the coercion before the middleware/interceptors?

✅ 1
ikitommi 2020-07-25T13:18:42.349800Z

@jarvinenemil it happens inside a coercion mw/int, e.g. request-coercion-middleware

👍 1
1
ikitommi 2020-07-25T13:22:13.354900Z

@drewverlee route guards are not supported within the core router, by design. But, you can create such higher-level routers on top of the core. For ring, you would ship your own reitit.ring/ring-handler which routes based on query-params too.

ikitommi 2020-07-25T13:22:25.355300Z

not trivial, but doable.

athomasoriginal 2020-07-25T17:34:44.361900Z

Hey all. Question about reitit backend routes for a SPA frontend I have a https://gist.github.com/athomasoriginal/14c6cfa1500bc1ab1a90a98b9d7217a0. The front end is a SPA (using reitit.frontend). My goal is to have all front end routes handled by the front end and just serve the index.html file and not change the URL. For example • localhost:3000/ (should serve the index.html file and not trigger a redirect) • localhost:3000/login (should serve the index.html file and not trigger a redirect) • localhost:3000/public/… (should serve resources as long as they exist) Right now, based on the example code in the gist, the routing does this: • visit localhost:3000/ is redirected to localhost:3000/index.html • visit localhost:3000/login results in nil • visit localhost:3000/public/css/styles.css will return the css file