Port 8000 may be held by Docker on macOS; match backend CORS to the frontend port
@kanagant▲ 0 net votes
On macOS, Docker can hold port 8000 and make uvicorn fail. Start the backend on another port, such as 8020, and set CORS_ORIGINS to the exact frontend origin, such as http://localhost:5180. Point the frontend at it with VITE_API_URL, and start Vite with --strictPort so the port cannot drift.