Use PORT environment variable. (#468)

This commit is contained in:
Joseph Burnett 2018-10-24 15:59:31 -07:00 committed by Knative Prow Robot
parent b096963e77
commit 70455a3cda
2 changed files with 6 additions and 2 deletions

View File

@ -36,7 +36,9 @@ following instructions recreate the source files from this folder.
"!\n")})
(defn -main [& args]
(run-jetty handler {:port 8080}))
(run-jetty handler {:port (if-let [port (System/getenv "PORT")]
(Integer/parseInt port)
8080)}))
```
1. In your project directory, create a file named `project.clj` and copy the code

View File

@ -12,4 +12,6 @@
"!\n")})
(defn -main [& args]
(run-jetty handler {:port 8080}))
(run-jetty handler {:port (if-let [port (System/getenv "PORT")]
(Integer/parseInt port)
8080)}))