Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

11 Commits

Repository files navigation

boot-jetty

a simple webserver for boot

[tailrecursion/boot-jetty "0.1.3"] ;; latest release

overview

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.

use cases

sample task with boot-jetty as a dev server for a hoplon application deployed to S3:

(deftaskdevelop []
(comp (watch) (speak) (reload) (cljs-repl) (hoplon) (cljs) (serve:port8000)))

sample task with boot-jetty as a clojure dev server:

(deftaskdevelop []
(comp (watch) (speak) (web) (serve:port8000)))

sample task with boot-jetty as a dev server for an angular js application deployed to S3:

(deftaskdevelop []
(comp (watch) (speak) (reload) (js) (less) (serve:port8000)))

sample task with boot-jetty bootstrapping a spring framework service:

(deftaskdevelop []
(comp (watch) (speak) (aot) (javac) (serve:port8000)))

windows users

If you get problems with locked files that can't be deleted, please try adding these init parameters:

(deftaskdevelop []
(comp ... (serve:init-params {"org.eclipse.jetty.servlet.Default.useFileMappedBuffer""false"})))

About

a simple webserver for boot

Resources

Stars

7 stars

Watchers

12 watching

Forks

Releases

Packages

Contributors

Languages