mirror of
https://github.com/Dokploy/examples.git
synced 2026-06-15 20:25:24 +02:00
Replaced `ip="0.0.0.0"` with `host="0.0.0.0"` in `main.py` to fix a TypeError during Flask startup. This change ensures compatibility with Flask's app.run() parameters and allows the app to bind to all interfaces as expected in production environments like Dokploy. ``` Traceback (most recent call last): File "/app/main.py", line 12, in <module> app.run(debug=False, ip="0.0.0.0", port=5000) File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 625, in run * Serving Flask app 'main' * Debug mode: off run_simple(t.cast(str, host), port, self, **options) TypeError: run_simple() got an unexpected keyword argument 'ip' ```
13 lines
192 B
Python
13 lines
192 B
Python
from flask import Flask
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
@app.route('/')
|
|
def hello_world():
|
|
return 'Hello, World!'
|
|
|
|
|
|
if __name__ == '__main__':
|
|
app.run(debug=False, host="0.0.0.0", port=5000)
|