Migrate from Ring Jetty adapter
HTTP Kit is an almost drop-in
replacement for the standard Ring Jetty adapter,
just replace run-jetty
with run-server
.
Few differences:
Stop server programmatically
Configuring HTTPS
http-kit relies on reverse proxy (like Nginx, Lighthttpd) to support HTTPS. They also can be used as a reverse proxy to serve static files and compress content.
Hitch is another option. It works well with websockets and long polling.
Sample configration for Nginx:
Hot code reload (lein ring server)
Hot code reload is very handy, with the Jetty one you can do something like:
lein-ring does not yet support http-kit, but
ring.middleware.reload
can be used as a workaround.