reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
2020-05-26T06:00:58.498700Z

This might interest someone here also. I published a simple tutorial for mixing Reitit with ClojureScript and Macchiato: https://dev.solita.fi/2020/05/26/clojurescript-web-serverwith-macchiato-shadowcljs-and-reitit.html

👏 4
ikitommi 2020-05-26T09:40:16.499100Z

Awesome, thanks for sharing!

👍 1
ikitommi 2020-05-26T11:30:57.000400Z

A small utility to list which middleware are effective in a reitit-ring endpoint:

(defn mounted-middleware [app path method]
  (->> app
       (ring/get-router)
       (r/compiled-routes)
       (filter (comp (partial = path) first))
       (first) (last) method :middleware (filterv :wrap)))