Created
September 21, 2011 17:40
-
-
Save srid/1232768 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Access /events in the browser | |
; Aleph throws an exception: | |
; java.lang.IllegalArgumentException: No implementation of method: :consumer of | |
; protocol: #'lamina.core.channel/ChannelProtocol found for class: nil | |
(ns stackato-doctor.playaleph | |
(:use compojure.core | |
ring.middleware.stacktrace | |
ring.adapter.jetty | |
lamina.core | |
aleph.http) | |
(:require [compojure.route :as route])) | |
(defn aleph-route [ch request] | |
(enqueue ch | |
{:status 200 | |
:headers {"content-type" "text/plain"} | |
:body "aleph response!!"})) | |
(defroutes app-routes | |
(GET "/" [] "This is a regular response.") | |
(GET "/events" [] (wrap-aleph-handler aleph-route)) | |
(route/not-found "Page not found")) | |
(def app (wrap-stacktrace app-routes)) |
Author
srid
commented
Sep 21, 2011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment