aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-11-02 21:33:04 +0100
committerThomas "Cakeisalie5" Touhey <thomas@touhey.fr>2018-11-02 21:33:04 +0100
commitaa862af791b28c173a0699b26e5943b2f46e3716 (patch)
treee635eeae20136e811662dbbc86f4a419ed4e1a0e /app
parentd8e817884de03a9230092138fa7e331472b1dc0f (diff)
Used PORT environment variable.
Diffstat (limited to 'app')
-rwxr-xr-xapp/__main__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/__main__.py b/app/__main__.py
index 79e8258..f57c9de 100755
--- a/app/__main__.py
+++ b/app/__main__.py
@@ -2,6 +2,7 @@
import sys as _sys
import os.path as _path
+from os import environ as _environ
from flask import Flask as _Flask, render_template as _template, \
request as _r
@@ -48,6 +49,6 @@ def run_app(port, debug = False):
return app.run(port = port, debug = debug)
if __name__ == '__main__':
- run_app(_sys.argv[1], True)
+ run_app(int(_environ.get('PORT')), True)
# End of file.