Search code examples
node.jsputty

How do I shut down node app.js & in Putty


I am using Putty. I used node app.js & to keep the server running even after I closed Putty. Now, after reopening Putty, I cannot figure out how to stop the server from running. What command should I use in this situation?


Solution

  • It really depends on which OS nodejs is running.

    For Linux based you can use pkill:

    pkill node
    

    For Windows based:

    taskkill /im node.exe
    

    Both commands kill all running nodejs instances.