Stop local server

For some reason it gets annoying when I create, see close the application on my local, but it still remains active on the same port.

With the following commands I can close port 8080 through the linux shell, just in those cases without needing to reboot, it will surely work for other ports.

In linux

The fuser command will be our friend with the parameters -k y -n

fuser -k -n tcp 8080

In windows

It’s a little easier, first you look up the PID of the process with

netstat -aon

When we see the ip with the busy port, then we end it with

TASKKILL /F /IM PID

And that should kill the windows server process.