how to close local host ports code example Example 1: kill local host bash npx kill-port 8080 Example 2: kill the process running on 8080 taskkill /F /PID