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"))}))