mirror of https://github.com/knative/docs.git
Make example use the PORT env var instead of 8080 (#415)
This commit is contained in:
parent
0be86f6ff2
commit
acd1adff92
|
@ -39,7 +39,7 @@ The following instructions recreate the source files from this folder.
|
||||||
return 'Hello World: {}!\n'.format(target)
|
return 'Hello World: {}!\n'.format(target)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(debug=True,host='0.0.0.0',port=8080)
|
app.run(debug=True,host='0.0.0.0',port=int(os.environ.get('PORT', 8080)))
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Create a file named `Dockerfile` and copy the code block below into it.
|
1. Create a file named `Dockerfile` and copy the code block below into it.
|
||||||
|
|
|
@ -10,4 +10,4 @@ def hello_world():
|
||||||
return 'Hello World: {}!\n'.format(target)
|
return 'Hello World: {}!\n'.format(target)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(debug=True,host='0.0.0.0',port=8080)
|
app.run(debug=True,host='0.0.0.0',port=int(os.environ.get('PORT', 8080)))
|
||||||
|
|
Loading…
Reference in New Issue