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)