a simple webserver for boot
[tailrecursion/boot-jetty "0.1.3"] ;; latest release
this task creates and serves an internal distribution from the fileset's output directories (resources and assets). the distribution mirrors the contents of the environment's target directory, but is served from jetty's classpath as an exploded war file.
without additional configuration, this task functions as a static webserver useful for client-side development. to host a service, simply compose it with boot's web task, which adds the clojure-adapter-servlet shim and a web.xml file to the distribution.
sample task with boot-jetty as a dev server for a hoplon application deployed to S3:
(deftask develop []
(comp (watch) (speak) (reload) (cljs-repl) (hoplon) (cljs) (serve :port 8000)))
sample task with boot-jetty as a clojure dev server:
(deftask develop []
(comp (watch) (speak) (web) (serve :port 8000)))
sample task with boot-jetty as a dev server for an angular js application deployed to S3:
(deftask develop []
(comp (watch) (speak) (reload) (js) (less) (serve :port 8000)))
sample task with boot-jetty bootstrapping a spring framework service:
(deftask develop []
(comp (watch) (speak) (aot) (javac) (serve :port 8000)))
If you get problems with locked files that can't be deleted, please try adding these init parameters:
(deftask develop []
(comp ... (serve :init-params {"org.eclipse.jetty.servlet.Default.useFileMappedBuffer" "false"})))