aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Procfile2
-rwxr-xr-xapp/__main__.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/Procfile b/Procfile
index 924f5c0..689e36a 100644
--- a/Procfile
+++ b/Procfile
@@ -1 +1 @@
-web: pipenv run python -m app $PORT
+web: pipenv run python -m app
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.