diff options
author | 2018-02-03 13:39:22 +0100 | |
---|---|---|
committer | 2018-02-03 13:39:22 +0100 | |
commit | e210f713e72216fc76e5f909a303edf79b851876 (patch) | |
tree | 5be52a4a2307b7c0ecbde0f368c8bdc258f56b19 | |
parent | Create basic page (diff) |
wrap in if main condition
the app willl be wrapped in gunicorn, so this is to avoid getting the wires tangled
-rw-r--r-- | __main__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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) |