aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallifrey/http_server.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallifrey/http_server.clj')
-rw-r--r--src/gallifrey/http_server.clj9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallifrey/http_server.clj b/src/gallifrey/http_server.clj
new file mode 100644
index 0000000..96b5757
--- /dev/null
+++ b/src/gallifrey/http_server.clj
@@ -0,0 +1,9 @@
+(ns gallifrey.http-server
+ (:require [org.httpkit.server :refer [run-server]]
+ [integrant.core :as ig]))
+
+(defmethod ig/init-key :gallifrey/http-server [_ {:keys [port handler]}]
+ (run-server handler {:port port}))
+
+(defmethod ig/halt-key! :gallifrey/http-server [_ server]
+ (server :timeout 100))