reitit

dumrat 2024-02-05T05:38:54.715109Z

Given this,

(defn routes []
  [["/" {:name ::home 
         :get {:handler (ok-hiccup-fn main-layout)}}]
   ["/index.html" {:name ::index
                   :get {:handler (fn [request] (resp/redirect "/"))}}]])
Is there a better way to write this than (using route names?) than specifying path? Edit: Or is this a case of just using the router in the request from handler?