how to stop localhost server code example
Example 1: kill local host bash
npx kill-port 8080
Example 2: how to listen to the process running in port 8080 and kill it
Steps to kill process running on port 8080 in Windows cmd/terminal,
#1 netstat -ano | findstr < Port Number >
#2 taskkill /F /PID < Process Id >
Example 3: stop localhost server
netstat -ano | findstr :yourPortNumber
tskill typeyourPIDhere