mirror of https://github.com/knative/docs.git
Use PORT environment variable. (#468)
This commit is contained in:
parent
b096963e77
commit
70455a3cda
|
@ -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
|
||||
|
|
|
@ -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)}))
|
||||
|
|
Loading…
Reference in New Issue