summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-12-03 23:42:03 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-12-03 23:42:03 +0100
commit6099415dffcc10b47f939fb043fbdf3718ca618a (patch)
tree8bc8afd079dffdf37f51726eca3db58daad846a7 /src
parente1feb02f5fbaa7dbb3c83ac26fd3eb00f9b72b36 (diff)
Make web server port and base URI configurable.
Diffstat (limited to 'src')
-rw-r--r--src/mulk/benki/main.clj6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mulk/benki/main.clj b/src/mulk/benki/main.clj
index 96faadb..a03961c 100644
--- a/src/mulk/benki/main.clj
+++ b/src/mulk/benki/main.clj
@@ -3,7 +3,7 @@
(:use [clojure core repl pprint]
noir.core
[hiccup core page-helpers]
- [mulk.benki util])
+ [mulk.benki util config])
(:require [noir server options]
[mulk.benki wiki auth]
[ring.middleware.file]
@@ -22,7 +22,7 @@
(defn wrap-base-uri [handler]
(fn [request]
- (let [base-uri "http://localhost:3001"]
+ (let [base-uri (:base-uri benki-config)]
(with-base-url base-uri
((noir.options/wrap-options handler {:base-url base-uri}) request)))))
@@ -31,7 +31,7 @@
(noir.server/add-middleware #(wrap-base-uri %))
(noir.server/add-middleware #(ring.middleware.file/wrap-file % "static")))
-(defonce server (doto (Thread. #(noir.server/start 3001))
+(defonce server (doto (Thread. #(noir.server/start (:web-port benki-config)))
(.setDaemon true)
(.start)))