diff --git a/start.py b/start.py index 016152e..243eaa8 100644 --- a/start.py +++ b/start.py @@ -68,5 +68,6 @@ if __name__ == "__main__": atexit.register(stop_scheduler) DEBUG = os.environ.get("FLASK_DEBUG", "").lower() in ("1", "true", "yes") bind_host = os.environ.get("FLASK_BIND", "127.0.0.1") - app.run(host=bind_host, port=int(os.environ.get("FLASK_PORT", "5000")), + # 开发模式使用 5001,避免与生产 Gunicorn(0.0.0.0:5000)抢端口。 + app.run(host=bind_host, port=int(os.environ.get("FLASK_PORT", "5001")), debug=DEBUG, threaded=True)