From de6c910cc1973a9d4a3126dd83bc1d89f5695fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=BBki=20Vachot?= Date: Mon, 18 Oct 2021 07:43:49 +0200 Subject: [PATCH] Update --- Procfile | 1 + app.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..e9aece8 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn -b :$PORT app:app \ No newline at end of file diff --git a/app.py b/app.py index 9ce63b1..7ea462c 100644 --- a/app.py +++ b/app.py @@ -1,3 +1,4 @@ +import os from flask import Flask app = Flask(__name__) @@ -6,4 +7,5 @@ def hello_world(): # put application's code here return 'Hello World!' if __name__ == '__main__': - app.run() + port = int(os.environ.get('PORT', 5000)) + app.run(host='0.0.0.0', port=port, debug=True)