|
|
|
@ -3,7 +3,26 @@
|
|
|
|
|
[wanijo.handler :as wanijo])
|
|
|
|
|
(:gen-class))
|
|
|
|
|
|
|
|
|
|
(defn -main [& args]
|
|
|
|
|
(defonce server (atom nil))
|
|
|
|
|
|
|
|
|
|
(defn start-server!
|
|
|
|
|
[& {:keys [port
|
|
|
|
|
join?]
|
|
|
|
|
:or {port 3080
|
|
|
|
|
join? true}}]
|
|
|
|
|
(reset! server
|
|
|
|
|
(run-jetty wanijo/standalone-app
|
|
|
|
|
{:port (Integer/valueOf (or (System/getenv "port")
|
|
|
|
|
"3080"))}))
|
|
|
|
|
{:port port
|
|
|
|
|
:join? join?})))
|
|
|
|
|
|
|
|
|
|
(defn start-server-dev! []
|
|
|
|
|
(start-server! :join? false
|
|
|
|
|
:port 8080))
|
|
|
|
|
|
|
|
|
|
(defn stop-server []
|
|
|
|
|
(.stop @server))
|
|
|
|
|
|
|
|
|
|
(defn -main [& args]
|
|
|
|
|
(start-server! :port (Integer/valueOf (or (System/getenv "port")
|
|
|
|
|
"3080"))
|
|
|
|
|
:join? false))
|
|
|
|
|