This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-06
Channels
- # announcements (7)
- # aws (8)
- # babashka (9)
- # babashka-sci-dev (11)
- # beginners (37)
- # calva (50)
- # cider (15)
- # clj-kondo (30)
- # clj-otel (3)
- # cljdoc (16)
- # cljs-dev (26)
- # cljsrn (4)
- # clojure (168)
- # clojure-doc (1)
- # clojure-europe (17)
- # clojure-gamedev (4)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-spec (17)
- # clojure-uk (16)
- # clojurescript (27)
- # community-development (3)
- # css (3)
- # cursive (9)
- # datomic (25)
- # emacs (1)
- # events (4)
- # fulcro (2)
- # google-cloud (2)
- # graphql (11)
- # gratitude (9)
- # humbleui (16)
- # hyperfiddle (2)
- # jobs (1)
- # london-clojurians (1)
- # lsp (16)
- # malli (2)
- # off-topic (71)
- # pedestal (4)
- # polylith (9)
- # portal (94)
- # reagent (6)
- # reitit (2)
- # releases (1)
- # remote-jobs (2)
- # sci (9)
- # shadow-cljs (49)
- # spacemacs (8)
- # tools-build (2)
- # tools-deps (39)
- # vim (7)
- # xtdb (6)
Something I stumbled over when I was first using reitit and what I still see many people stumble over (including those using Luminus) is how to combine Reitit middleware with default ring middleware efficiently.
For example, ring-defaults
includes middleware for static resources (`wrap-resources`) that makes reitit’s resource handler obsolete. This can be confusing because configuring the resource handler seemingly has no effect.
Also, when using Reitit you probably prefer data-driven middleware over ring-default’s function chain, as a vector of middleware is easier to inspect and reason about.
So my question is: Is there already some kind of library out there that “translates” ring-defaults to Reitit? I’m thinking of creating one but want to make sure it does not exist already 🙃
Update: This exists by now: https://github.com/ferdinand-beyer/reitit-ring-defaults 🙂