Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combining routes in Compojure

I have two different web applications in Clojure developed with Compojure. Each use defroutes to create its handler.

How can I combine the two different definitions of defroutes into one defroute? I want to reuse the routes of the first app into the second.

like image 446
z1naOK9nu8iY5A Avatar asked Nov 30 '11 16:11

z1naOK9nu8iY5A


1 Answers

You can use compojure.core/routes to combine routes:

 (def my-handler
    (routes some-handler
            some-other-handler))
like image 177
Joost Diepenmaat Avatar answered Nov 05 '22 05:11

Joost Diepenmaat