Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

an asynchronous web server, written in clojure

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.textile
Octocat-spinner-32 project.clj

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.