If you changed something and chnages not reflecting and you want to start server
1 | npm start |
but if its shows that port is already running then you have first close this port and then try to start it.
How to Close/Stop PORT
1. Terminate the existing process using port 5000:
If you have a server already running on port 5000 (and you want to restart it), you need to stop that process first.
For Windows:
- Open Command Prompt or PowerShell as Administrator.
- Find the process using port 5000:1netstat -ano | findstr :5000
- This will show you the Process ID (PID) of the application using port 5000. E.X
TCP 0.0.0.0:5000 0.0.0.0:0 LISTENING 4980
TCP [::]:5000 [::]:0 LISTENING 4980 - Kill the process using the PID found above. For example, if the PID is
4980
, use:1taskkill /PID 1234 /F
This command forcefully stops the process occupying port 5000.
- This will show you the Process ID (PID) of the application using port 5000. E.X