Fork me on GitHub
#luminus
<
2017-10-29
>
albaker15:10:45

so are compojure and compojure-api mutually exclusive in a single namespace, i.e. GET clashes? Or, can you use compojure-api in place of compojure?

ikitommi16:10:05

@albaker you can use both, but the names do clash unless you use use full paths or different aliases, e.g.

(require '[compojure.core :as cc])
(require '[compojure.api.core :as cac])

(cc/routes
  (cac/routes
     ...

ikitommi16:10:07

but you can use c-api in place of compojure, c-api just wraps the compojure stuff.

ikitommi16:10:44

some subtle differences, for example c-api routes allows sequences of routes and nil routes, compojure requires that everything is a ring handler.

albaker17:10:39

Ok, thanks!