summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-05-05 11:32:05 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-05-05 11:36:22 +0200
commit46febb3205ad768b044ad13caa68c4eba5ce41bb (patch)
treee6058e741e00327e78361b762e649339eccc58b3
parent7ea971a34d5df944c1df29dd0bbe1fdb9d7fc17a (diff)
Make uberjar'able.
-rw-r--r--project.clj2
-rw-r--r--src/mulk/benki/main.clj11
2 files changed, 7 insertions, 6 deletions
diff --git a/project.clj b/project.clj
index 2809e5c..6269f70 100644
--- a/project.clj
+++ b/project.clj
@@ -1,4 +1,4 @@
-(defproject benki "0.0.0"
+(defproject benki "0.0.0-SNAPSHOT"
:description "The Benkard Family Hub"
:dependencies [[org.clojure/clojure "1.3.0"]
diff --git a/src/mulk/benki/main.clj b/src/mulk/benki/main.clj
index 031a500..55239d5 100644
--- a/src/mulk/benki/main.clj
+++ b/src/mulk/benki/main.clj
@@ -14,7 +14,8 @@
[aleph.http :as ahttp]
[aleph.formats :as aformats]
[ring.util.codec :as codec])
- (:import [java.math BigDecimal BigInteger]))
+ (:import [java.math BigDecimal BigInteger])
+ (:gen-class))
(defn wrap-utf-8 [handler]
@@ -91,13 +92,13 @@
{:port (:web-port @benki-config)
:websocket true})))
-(defonce server
+(def server (atom nil))
+
+(defn -main [& args]
(do
(future (mulk.benki.xmpp/init-xmpp!))
(future (mulk.benki.lazychat/init-lazychat!))
- (future (run-server))))
-
-(defn -main [& args]
+ (future (swap! server (run-server))))
(loop []
(Thread/sleep 1000000)
(recur)))