function | since v1.10.126 | Edit |
(serve {:keys [host port output-dir], :as opts})
(defn serve [{:keys [host port output-dir] :as opts}]
(println "Serving HTTP on" host "port" port)
(binding [ordering (agent {:expecting nil :fns {}})
es (Executors/newFixedThreadPool 16)
server/state (atom {:socket nil})]
(server/start
(merge opts
{:static-dir (cond-> ["." "out/"] output-dir (conj output-dir))
:gzip? true}))))