stop all instances of node.js server

前端 未结 16 1800
我在风中等你
我在风中等你 2020-11-28 17:23

This is my first time working with Node.js and I ran into this problem:

I have started a Node server through the plugin of an IDE. Unfortunately, I cannot use the ID

16条回答
  •  广开言路
    2020-11-28 17:53

    if you want to kill a specific node process , you can go to command line route and type:

    ps aux | grep node
    

    to get a list of all node process ids. now you can get your process id(pid), then do:

    kill -9 PID
    

    and if you want to kill all node processes then do:

    killall -9 node
    

    -9 switch is like end task on windows. it will force the process to end. you can do:

    kill -l
    

    to see all switches of kill command and their comments.

提交回复
热议问题