From bbb70dee15c88612ddc35565af6b2b9940357e8d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Tue, 15 Nov 2011 12:50:04 +0100 Subject: Fix Ring middleware setup. --- src/mulk/benki/main.clj | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mulk/benki/main.clj b/src/mulk/benki/main.clj index 1fba60e..b1afa11 100644 --- a/src/mulk/benki/main.clj +++ b/src/mulk/benki/main.clj @@ -8,10 +8,6 @@ [mulk.benki wiki auth])) -(defonce server (doto (Thread. #(noir.server/start 3001)) - (.setDaemon true) - (.start))) - (defn wrap-utf-8 [handler] (fn [request] (let [response (handler request) @@ -24,7 +20,6 @@ (defn wrap-base-uri [handler] (fn [request] - (prn "Hello!") (let [base-uri "http://localhost:3001"] (with-base-url base-uri ((noir.options/wrap-options handler {:base-url base-uri}) request))))) @@ -33,6 +28,10 @@ (noir.server/add-middleware #(wrap-utf-8 %)) (noir.server/add-middleware #(wrap-base-uri %))) +(defonce server (doto (Thread. #(noir.server/start 3001)) + (.setDaemon true) + (.start))) + (defn -main [& args] (loop [] -- cgit v1.2.3