specify port with envvar PORT

This commit is contained in:
Jill 2022-08-02 05:49:10 +02:00
parent b1e7e19ffa
commit 64e93413dd
1 changed files with 5 additions and 2 deletions

View File

@ -843,5 +843,8 @@ def oEmbedGen(description, user, video_link, ttype):
if __name__ == "__main__":
app.config["SERVER_NAME"] = "localhost:80"
app.run(host="0.0.0.0")
port = "80"
if "PORT" in os.environ:
port = os.environ["PORT"]
app.config["SERVER_NAME"] = "localhost:" + port
app.run(host="0.0.0.0", port=port)