summaryrefslogtreecommitdiff
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
parent5ff55cd6309d570a5297c0b26dfd623b1fadd604 (diff)
Enable the use of “lein run” to run the server.
-rw-r--r--project.clj9
-rw-r--r--src/mulk/benki/main.clj12
-rw-r--r--src/mulk/benki/wiki.clj3
3 files changed, 14 insertions, 10 deletions
diff --git a/project.clj b/project.clj
index d7e976c..01cbfe3 100644
--- a/project.clj
+++ b/project.clj
@@ -1,11 +1,7 @@
(defproject benki "0.0.0"
:description "The Benkard Family Hub"
- :dependencies [;;[org.clojure/clojure "1.4.0-master-SNAPSHOT"]
- [org.clojure/clojure "1.3.0"]
- ;;[org.clojure.contrib/standalone "1.3.0-alpha4"]
+ :dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure.contrib/standalone "1.3.0-SNAPSHOT"]
- ;;[match "0.2.0-SNAPSHOT"]
- ;; https://oss.sonatype.org/content/repositories/snapshots/org/clojure/
[org.clojure/core.match "0.2.0-SNAPSHOT"]
[org.clojure/core.logic "0.6.6-SNAPSHOT"]
[org.clojure/core.unify "0.5.2-SNAPSHOT"]
@@ -35,5 +31,6 @@
:repositories [["sonatype-snapshots"
;;https confuses leiningen (but not cake)
"http://oss.sonatype.org/content/repositories/snapshots/"]
- ["clojars" "http://clojars.org/repo/"]])
+ ["clojars" "http://clojars.org/repo/"]]
+ :main mulk.benki.main)
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))