Return to Flask

This commit is contained in:
2025-08-26 10:52:13 +00:00
parent c59732aef3
commit be4c8cc2a5
3 changed files with 6 additions and 13 deletions

10
run.py
View File

@@ -15,11 +15,5 @@ if __name__ == '__main__':
debug_mode = config_name == 'development'
port = int(os.getenv('PORT', 5000)) # Use PORT env var or default to 5000
# For production deployment with Gunicorn, SocketIO will be handled by Gunicorn
# For development, we use SocketIO's built-in server
if config_name == 'production':
# In production, Gunicorn will handle the server
# This is just a fallback
socketio.run(app, debug=False, host='0.0.0.0', port=port, allow_unsafe_werkzeug=True)
else:
socketio.run(app, debug=debug_mode, host='0.0.0.0', port=port)
# Run with SocketIO's built-in server for both development and production
socketio.run(app, debug=debug_mode, host='0.0.0.0', port=port, allow_unsafe_werkzeug=True)