Skip to content
an asynchronous web server, written in clojure
Pull request Compare This branch is 1 commit ahead, 909 commits behind ztellman:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Aleph is an asynchronous web server, built on top of Netty.

It conforms to the interface described by Ring, with one small difference: the request and response are decoupled.

(use 'aleph)
(defn hello-world [request]
  (respond! request
    {:status 200
     :headers {"Content-Type" "text/html"}
     :body "Hello World!"}))

(run-aleph hello-world {:port 8080})

Notice that the response is an explicit step, using (respond! request response). This gives a much greater degree of flexibility than the servlet model, and allows more straightforward use of Clojure’s concurrency primitives.

This is very experimental, but also a very interesting sandbox to play around in. Contributions and ideas are welcome.

Something went wrong with that request. Please try again.