Skip to content

Instantly share code, notes, and snippets.

@greut
Last active August 17, 2018 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greut/4cf73b35bc175cecd6a17fa6ad2e00e1 to your computer and use it in GitHub Desktop.
Save greut/4cf73b35bc175cecd6a17fa6ad2e00e1 to your computer and use it in GitHub Desktop.
(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