listen on the right pordt
This commit is contained in:
parent
745314c13d
commit
ca78ad1860
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
pom.xml
|
||||
*jar
|
||||
/classes/
|
||||
/.lein-deps-sum
|
||||
/.lein-failures
|
||||
/.lein-env
|
||||
/checkouts
|
||||
/.env
|
||||
/target
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user