windows 下node
一、查询端口占用的进程ID:windows
netstat -aon | findstr "80" 80为端口号,进程
输出为: TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 10820程序
二、查看端口号所对应的应用程序:查询
tasklist | findstr " 10820"端口
node.exe 10820 Console 2 34,020 K
三、终止进程
taskkill /pid 10820 /F
成功: 已终止 PID 为 10820 的进程。
注意:两个/前面是要有空格的,后面没空格