From 8fe64da6e54273a699f48d26609efa1a71661ba7 Mon Sep 17 00:00:00 2001 From: Hugo Pierret Date: Sat, 19 Oct 2024 18:17:19 +0200 Subject: [PATCH] Modify port environment --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 0b47046..1992ea9 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import os from flask import Flask from flask_cors import CORS from src.api.routes import api_bp @@ -14,5 +15,7 @@ def create_app(): return app if __name__ == "__main__": + port = int(os.environ.get("PORT", 5000)) + app = create_app() - app.run(debug=True) \ No newline at end of file + app.run(host='0.0.0.0', port=port, debug=True) \ No newline at end of file