server.on('error', onError);如果報(bào)錯(cuò)Error: listen EADDRINUSE :::4000,說(shuō)明4000端口被占用,那怎樣在onError事件中如果監(jiān)聽(tīng)到 EADDRINUSE,不進(jìn)命令行,也不進(jìn)任務(wù)管理,怎樣用代碼執(zhí)行去關(guān)閉殺掉當(dāng)前被占用的端口的應(yīng)用?
node服務(wù)器監(jiān)聽(tīng)錯(cuò)誤問(wèn)題
慕蓋茨4494581
2018-09-02 13:21:22