diff options
-rw-r--r-- | Procfile | 2 | ||||
-rwxr-xr-x | app/__main__.py | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -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. |