This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-28
Channels
- # announcements (33)
- # aws (2)
- # babashka (14)
- # beginners (128)
- # calva (34)
- # cestmeetup (3)
- # clj-kondo (12)
- # cljdoc (3)
- # clojure (114)
- # clojure-europe (31)
- # clojure-italy (3)
- # clojure-nl (7)
- # clojure-uk (6)
- # clojurescript (35)
- # conjure (20)
- # cursive (3)
- # data-science (3)
- # datomic (16)
- # docker (13)
- # events (1)
- # figwheel-main (22)
- # fulcro (109)
- # jobs (1)
- # kaocha (8)
- # keechma (1)
- # lambdaisland (5)
- # malli (1)
- # meander (8)
- # mid-cities-meetup (1)
- # off-topic (6)
- # overtone (7)
- # pathom (6)
- # re-frame (2)
- # reitit (9)
- # ring (1)
- # shadow-cljs (92)
- # specter (1)
- # tools-deps (311)
- # xtdb (76)
(def router
(reitit/router
["/"
["" {:conflicting true
:name :home
:view #'home-page
:controllers [{:start (fn [_] (rf/dispatch [:page/init-home]))}]}]
["org"
[""
{:conflicting true
:name :org
:view #'home-page
:controllers [{:start (fn [_] (js/console.log "/org"))}]}]
["/new"
{:conflicting true
:name :org-new
:view #'home-page
:controllers [{:start (fn [_] (js/console.log "/org/new called"))}]}]]]))
is there a way i can accept a json body in any format ? something like
:parameters {:body (s/keys)}
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!
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.