stop all instances of node.js server

前端 未结 16 1677
我在风中等你
我在风中等你 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 18:01

    You can try this:

    taskkill /IM node.exe -F
    
    0 讨论(0)
  • 2020-11-28 18:03

    Linux

    To impress your friends

    ps aux | grep -i node | awk '{print $2}' | xargs  kill -9
    

    But this is the one you will remember

    killall node
    
    0 讨论(0)
  • 2020-11-28 18:05

    You could also try:

    killall nodejs

    0 讨论(0)
  • 2020-11-28 18:05

    Use the following command to kill and restart node server from batch file

        @echo off
    cd "D:\sam\Projects\Node"
    taskkill /IM node.exe -F
    start /min cmd /C "node index.js"
    goto :EOF
    
    0 讨论(0)
提交回复
热议问题