Given a simple webapplication like
(ns webtest.handler
(:require [compojure.core :refer :all]
[compojure.route :as route]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
(defroutes app-routes
(GET "/" [] "Hello World")
(route/not-found "Not Found"))
(def app
(-> (wrap-defaults app-routes site-defaults)))
that can be started using lein ring server
, how would one be able to adapt the project to switch out the jetty adapter for another ring adapter, for instance undertow or http-kit?
For reference, here's the excerpt of the lein project.clj
in use:
:dependencies [[org.clojure/clojure "1.9.0"]
[ring "1.8.1" :exclusions [ring/ring-jetty-adapter]]
[luminus/ring-undertow-adapter "1.1.0"]
[ring/ring-defaults "0.3.2"]
[compojure "1.6.1"]]
:plugins [[lein-ring "0.12.5"]]
:ring {:handler webtest.handler/app}