Aleph-compojure-sample is a project mainly written in Clojure, it's free.
Sample project setting up compojure routes over aleph
Sample aleph web app with compojure routes.
lein run
(defn hello-handler
"Our handler for the /hello path"
[ch request]
(let [params (parse-request-params request)
name (params :name)]
(enqueue ch
{:status 200
:headers {}
:body (str "Hello " name)})))
(defroutes my-routes
(GET ["/hello/:name", :name #"[a-zA-Z]+"] {} (wrap-aleph-handler hello-handler))
(route/not-found "Page not found"))
(defn start
"Start our server in the specified port"
[port]
(start-http-server (wrap-ring-handler my-routes) {:port port}))
Copyright (C) 2011 Boris Shimanovsky
Distributed under the MIT license.