Skip to content

Instantly share code, notes, and snippets.

@ztellman
Forked from goodmike/aleph-with-moustache.clj
Created October 25, 2010 23:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ztellman/646028 to your computer and use it in GitHub Desktop.
Save ztellman/646028 to your computer and use it in GitHub Desktop.
(ns dining-service
(:use aleph.core)
(:use aleph.http)
(:use net.cgrand.moustache)
)
(defn report-handler [response-channel request]
(enqueue response-channel
{:status 200
:headers {"content-type" "text/plain"}
:body "This is where the report would be."}))
(declare my-app)
(def my-app (app
["hello"] {:get "Just Hello"}
["report"] {:get (wrap-aleph-handler report-handler)}))
(defn boot []
(start-http-server (wrap-ring-handler my-app) {:port 8080}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment