|
@@ -0,0 +1,17 @@
|
|
|
+(ns example.core
|
|
|
+ (:require [ring.middleware.resource :refer [wrap-resource]]
|
|
|
+ [org.httpkit.server :refer [run-server]]))
|
|
|
+
|
|
|
+(defn say-hi [req] false) ;{:status 200 :body "hi" :content-type "text/plain"}
|
|
|
+
|
|
|
+(def appx (-> say-hi
|
|
|
+ (wrap-resource "public")))
|
|
|
+
|
|
|
+(defn app [req] {:status 200 :body "hi" :content-type "text/plain"})
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+(defn start! []
|
|
|
+ (println "server on.")
|
|
|
+ (run-server app {:port 8080}))
|