Last active
August 17, 2018 07:15
-
-
Save greut/4cf73b35bc175cecd6a17fa6ad2e00e1 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 aleph.examples.server | |
(:require | |
[compojure.core :as compojure :refer [GET]] | |
[aleph.http :as http])) | |
(defn hello-handler | |
[req] | |
{:status 200 | |
:headers {"content-type" "text/plain"} | |
:body "hello\n"}) | |
(def handler | |
(compojure/routes | |
(GET "/" [] hello-handler))) | |
(defn -main | |
[& _] | |
(http/start-server handler {:port 8080})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment