Troubleshooting: Why can't I access localhost:3000?
If you see errors like "This site can't be reached" or "Connection Refused", follow this checklist designed for Full Stack Developers.
1. Is your server actually running?
It sounds obvious, but 80% of the time, the terminal process has stopped or crashed. Ensure your terminal is open and you see a success message like:
Listening on http://localhost:3000
Fix: Go to your project folder and run npm start, yarn dev, or node app.js again.
2. Error: "Address already in use" (EADDRINUSE)
This means another program is already running on port 3000. You need to kill the "zombie" process.
For Mac / Linux Users:
Find the process ID (PID) and kill it:
# You will see a PID, e.g., 12345
kill -9 12345
For Windows Users:
Find the process and terminate it via Command Prompt:
taskkill /PID
3. Check Protocol (HTTP vs HTTPS)
Modern browsers sometimes force https://. Local development servers usually run on http://. Ensure your address bar explicitly says:
Check if your browser is auto-redirecting to HTTPS. Try opening the link in Incognito Mode.