summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-11-05 19:42:36 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-11-05 19:42:36 +0100
commitdc5646d243dd48922f54e962e7eb4c0d729e930e (patch)
tree59b6ee7c055476ac8764b42ad44f854a7b04311d /src
parent5ff55cd6309d570a5297c0b26dfd623b1fadd604 (diff)
Enable the use of “lein run” to run the server.
Diffstat (limited to 'src')
-rw-r--r--src/mulk/benki/main.clj12
-rw-r--r--src/mulk/benki/wiki.clj3
2 files changed, 11 insertions, 4 deletions
diff --git a/src/mulk/benki/main.clj b/src/mulk/benki/main.clj
index 59aa512..9d36a31 100644
--- a/src/mulk/benki/main.clj
+++ b/src/mulk/benki/main.clj
@@ -4,10 +4,13 @@
noir.core
[hiccup core page-helpers]
[mulk.benki util])
- (:require noir.server))
+ (:require noir.server
+ [mulk.benki wiki auth]))
-(defonce server (noir.server/start 3000))
+(defonce server (doto (Thread. #(noir.server/start 3000))
+ (.setDaemon true)
+ (.start)))
(defn wrap-utf-8 [handler]
(fn [request]
@@ -44,3 +47,8 @@
(layout
[:h1 "Journal"]))
+
+(defn -main [& args]
+ (loop []
+ (Thread/sleep 1000000)
+ (recur)))
diff --git a/src/mulk/benki/wiki.clj b/src/mulk/benki/wiki.clj
index 094bf02..9615f0b 100644
--- a/src/mulk/benki/wiki.clj
+++ b/src/mulk/benki/wiki.clj
@@ -12,8 +12,7 @@
clojureql.core
[clojure.java.jdbc
:only [transaction]]
- noir.core)
- (:require mulk.benki.main))
+ noir.core))
(def page_revisions (table :page_revisions))