compojure, create routes for HTML and JSON

I’m studying clojure, and trying to develop a web-app backend I wanted to define routes for both HTML and JSON responses. Using ring, compojure, I found this solution: (ns reagent01.handler (:require [ring.middleware.json :refer [wrap-json-response]] [ring.util.response :refer [response]] [compojure.core :refer [GET defroutes routes]] [compojure.route :refer [not-found resources]] [hiccup.page :refer [include-js include-css html5]] [reagent01.middleware :refer [wrap-middleware]] [ring.middleware.defaults […]