fix: update Flask port configuration to support environment variable
- Modified the Flask application to allow the port to be set via the `FLASK_PORT` environment variable, defaulting to 8080 if not specified. - Ensured existing application logic remains unchanged while enhancing configurability for deployment environments.
This commit is contained in:
@@ -733,7 +733,7 @@ if __name__ == '__main__':
|
||||
|
||||
# Start web service
|
||||
host = os.getenv("FLASK_HOST", "0.0.0.0")
|
||||
port = 8080
|
||||
port = os.getenv("FLASK_PORT", 8080)
|
||||
debug = os.getenv("FLASK_DEBUG", "false").lower() == "true"
|
||||
|
||||
app.run(host=host, port=port, debug=debug, threaded=True)
|
||||
Reference in New Issue
Block a user