From ca78ad1860a9d9610883cb3b66d239232d21b0dd Mon Sep 17 00:00:00 2001 From: Morgan Date: Tue, 3 Mar 2015 08:46:57 +0000 Subject: listen on the right pordt --- src/pronouns/web.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/pronouns/web.clj') diff --git a/src/pronouns/web.clj b/src/pronouns/web.clj index 849465a..1a0ff63 100644 --- a/src/pronouns/web.clj +++ b/src/pronouns/web.clj @@ -10,7 +10,7 @@ [ring.adapter.jetty :as jetty] [environ.core :refer [env]])) -(def config {:server-port 5000}) +(def config {:default-server-port 5000}) (defroutes app-routes (GET "/" [] @@ -30,12 +30,14 @@ (def app (-> app-routes - ; logger/wrap-with-logger + logger/wrap-with-logger wrap-error-page trace/wrap-stacktrace)) (defn -main [] - (jetty/run-jetty app {:port (:server-port config)})) + (let [port (or (Integer. (env :port)) + (:default-server-port config))]) + (jetty/run-jetty app {:port port})) ;; For interactive development: ;; (.stop server) -- cgit