From 9e0d8986a235b7f5b9410457adb05479db9620d3 Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Tue, 22 Jan 2019 09:10:34 +0100 Subject: [PATCH] standalone --- project.clj | 5 ++++- src/wanijo/main.clj | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/wanijo/main.clj diff --git a/project.clj b/project.clj index 3949d68..db577ba 100644 --- a/project.clj +++ b/project.clj @@ -32,7 +32,10 @@ [lein-cloverage "1.0.13"] [cider/cider-nrepl "LATEST"] [lein-kibit "LATEST"]]} - :uberjar {:aot :all}} + :uberjar {:aot :all + :main wanijo.main + :dependencies [[ring/ring-jetty-adapter "1.7.1"] + [ring/ring-devel "1.7.1"]]}} :neo4j {:path "neo4j"} :repl-options {:init-ns wanijo.framework.repl} diff --git a/src/wanijo/main.clj b/src/wanijo/main.clj new file mode 100644 index 0000000..af30896 --- /dev/null +++ b/src/wanijo/main.clj @@ -0,0 +1,9 @@ +(ns wanijo.main + (:require [ring.adapter.jetty :refer [run-jetty]] + [wanijo.handler :as wanijo]) + (:gen-class)) + +(defn -main [& args] + (run-jetty wanijo/app + {:port (Integer/valueOf (or (System/getenv "port") + "3080"))}))