-
-
Save ztellman/646028 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
(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