how to close port 3000 running

C++
### For Linux/Mac OS search (sudo) run this in the terminal:
$ lsof -i tcp:3000
$ kill -9 PID

### On Windows:
netstat -ano | findstr :3000
tskill typeyourPIDhere 

### change tskill for taskkill in git bashnetstat -ano | findstr :3000
taskkill /PID "123" /F netstat -ano | findstr :3000
taskkill /F /PID PID_of_port
Source

Also in C++: