Fixing "Port 5000" Conflicts
Port 5000 is notorious on macOS Monterey (and later) because the AirPlay Receiver uses it by default. It is also the default for Python Flask apps.
1. macOS AirPlay Receiver Conflict
If you are on a Mac and cannot start your Flask/React app on port 5000, it's likely the system's "AirPlay Receiver".
The Fix: Go to System Preferences > Sharing and uncheck "AirPlay Receiver". Or, turn it off to free up the port.
2. Python Flask Not Running?
Ensure your virtual environment is active and the app is running. By default, Flask runs on 5000.
export FLASK_APP=app.py
flask run
3. ASP.NET Core Dev Certs
For .NET developers, 5000 (HTTP) and 5001 (HTTPS) are standard. If connection is refused, check your HTTPS developer certificates.
dotnet dev-certs https --clean
dotnet dev-certs https --trust