reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
oly 2020-07-28T09:57:05.370800Z

is there a way i can accept a json body in any format ? something like

:parameters {:body (s/keys)}

dharrigan 2020-07-28T10:26:12.371400Z

If using malli, you could have any?, perhaps.

ikitommi 2020-07-28T10:29:44.372100Z

any? should work with spec too

miikka 2020-07-28T10:35:43.373200Z

We've deprecated the docs at https://metosin.github.io/reitit/ in favor of the docs at cljdoc. I tried to keep the images around as-is and set up redirects so that hopefully old links still work!

miikka 2020-07-28T10:36:32.373700Z

(The docs were the same, there were just two copies hosted at different places)

dharrigan 2020-07-28T10:47:09.374Z

that's great - less confusing 🙂

oly 2020-07-28T10:53:21.374400Z

cheers i will give any? a try 🙂

athomasoriginal 2020-07-28T21:18:04.379800Z

I had a chance to work on this question further: https://clojurians.slack.com/archives/C7YF1SBT3/p1595698484361900 The solution I currently have is borrowed from https://github.com/metosin/reitit/blob/9729a7424ee024c6e6c995f236531dfb2f93ce66/examples/frontend-controllers/src/backend/server.clj#L6 where my router uses https://gist.github.com/athomasoriginal/14c6cfa1500bc1ab1a90a98b9d7217a0#file-reitit-backend-spa-cljs-L39. If this solution is fine, my question is now: Is the purpose of create-resource-handler not so much as a spa fallback + static resource shortcut, but just as a quick way to make static resources (example: public/css/* or public/cljs-out/* available without having to specify each route individually? :thinking_face: My original thought was that it would look for static files and if none found just return the public/index.html file.