Created
August 11, 2014 15:28
-
-
Save laczoka/84fc9f2f080b406c4d43 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 blocking.core | |
(:require [org.httpkit.server :refer [run-server] :as http])) | |
(def c (atom 0)) | |
(defn app-blocking [req] | |
(println "Serving blocking connect " (swap! c inc)) | |
(Thread/sleep 3000) | |
{:status 200 | |
:headers {"Content-Type" "text/plain"} | |
:body "hello HTTP!"}) | |
(defn -main | |
[] | |
(run-server app-blocking {:port 8080 :thread 1}) | |
(println "Server running")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment