From e210f713e72216fc76e5f909a303edf79b851876 Mon Sep 17 00:00:00 2001 From: Christopher Baklid Date: Sat, 3 Feb 2018 13:39:22 +0100 Subject: wrap in if main condition the app willl be wrapped in gunicorn, so this is to avoid getting the wires tangled --- __main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/__main__.py b/__main__.py index 91eeda75..c1a40ad6 100644 --- a/__main__.py +++ b/__main__.py @@ -12,4 +12,5 @@ app.secret_key = os.environ.get("WEBPAGE_SECRET_KEY") def index(): return "Hello." -app.run(port=int(os.environ.get("WEBPAGE_PORT")), debug=False) +if __name__ == '__main__': + app.run(port=int(os.environ.get("WEBPAGE_PORT")), debug=False) -- cgit v1.2.3