Boot is a Clojure build framework. Here is an example of a basic ring application that is run using boot. The project folder is shown below.
\---ring-helloworld
| build.boot
|
\---src
\---qlambda
\---server
core.clj
;core.clj
(ns qlambda.server.core
(:require [ring.adapter.jetty :as jetty]))
(defn handler [req]
{:status 200
:body "Hello World"})
(defn -main [& args]
(jetty/run-jetty handler {:port 8080}))
;boot.clj
(set-env!
:source-paths #{"src"}
:dependencies '[[org.clojure/clojure "1.8.0"]
[ring "1.5.0"]])
(require '[qlambda.server.core :as server])
(deftask run []
(with-pre-wrap fileset (server/-main) fileset))
To run go to the project root directory and execute
boot run
Go to http://localhost:8080 to see the response.