From dc5646d243dd48922f54e962e7eb4c0d729e930e Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 5 Nov 2011 19:42:36 +0100 Subject: =?UTF-8?q?Enable=20the=20use=20of=20=E2=80=9Clein=20run=E2=80=9D?= =?UTF-8?q?=20to=20run=20the=20server.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.clj | 9 +++------ src/mulk/benki/main.clj | 12 ++++++++++-- src/mulk/benki/wiki.clj | 3 +-- 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)) -- cgit v1.2.3