From 64e93413dd36c11651c23bc7c8bc4430b1f0428d Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Tue, 2 Aug 2022 05:49:10 +0200 Subject: [PATCH] specify port with envvar PORT --- twitfix.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/twitfix.py b/twitfix.py index 101be2f..a51a868 100644 --- a/twitfix.py +++ b/twitfix.py @@ -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)