Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
an asynchronous web server, written in clojure
branch: master

This branch is 1 commit ahead, 656 commits behind ztellman:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
test
.gitignore
README.textile
project.clj

README.textile

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.