about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pronouns/web.clj8
1 files changed, 5 insertions, 3 deletions
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)