Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
aleph and noir
(require '[noir.server :as server])
(use 'noir.core 'aleph.http 'lamina.core)
(defn async-response [response-channel request]
(enqueue response-channel
{:status 200
:headers {"content-type" "text/plain"}
:body "async response"}))
(defpage "/" [] "hey from Noir!")
(custom-handler "/async" [] (wrap-aleph-handler async-response))
(def handler (server/gen-handler))
(start-http-server (wrap-ring-handler handler) {:port 8083})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.