Skip to content
Nguyễn Hà Dương edited this page Apr 23, 2014 · 12 revisions

Routes can be nested using the context macro:

(defroutes api-routes
  (GET "/something" [] ...)      ; matches /something
  (GET "/something-else" [] ...) ; matches /something-else

(defroutes main-routes
  (context "/api" [] api-routes) ; matches /api/something and /api/something-else
  other-routes)

Clone this wiki locally