Skip to content

Instantly share code, notes, and snippets.

@mavericklou
Created March 16, 2012 06:43
Show Gist options
  • Save mavericklou/2048809 to your computer and use it in GitHub Desktop.
Save mavericklou/2048809 to your computer and use it in GitHub Desktop.
aleph 0.2.1-alpha2-SNAPSHOT hang when compile
(ns alephtest.core
(:use aleph.core
aleph.http
lamina.core
))
(defn put-handler
[ch request]
(println "######")
(let [is (:body request)
out-ch (channel)]
(while (pos? (.available is))
(enqueue out-ch (.readLine is))))
(enqueue ch
{:status 200
:headers {"content-type" "text/plain"}
:body "OK"}))
(defn start [port]
(start-http-server (wrap-ring-handler (wrap-aleph-handler put-handler)) {:port port}))
(defn -main [& args]
(start 8675))
(defproject alephtest "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.2.0"]
[aleph "0.2.1-alpha2-SNAPSHOT"]
]
:main alephtest.core)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment