how to release localhost from Error: listen EADDRINUSE

前端 未结 28 2186
孤独总比滥情好
孤独总比滥情好 2020-11-28 17:53

i am testing a server written in nodejs on windows 7 and when i try to run the tester in the command line i get the following error

Error: listen EADDRINUSE
         


        
28条回答
  •  旧时难觅i
    2020-11-28 18:34

    [SOLVED]

    It's might be too late but it's working like a charm.

    You need pm2 to be installed

    npm install -g pm2
    

    To stoping the current running server (server.js):

    pm2 stop -f server.js
    

提交回复
热议问题