I have this test.js running in Node.js under CentOS 5. It works perfectly. Problem is, it won't stop! Even after closing my ssh client, it won't stop.
How can I stop a running script?
Method 1: Using ctrl+C key: When running a program of NodeJS in the console, you can close it with ctrl+C directly from the console with changing the code shown below: Method 2: Using process. exit() Function: This function tells Node. js to end the process which is running at the same time with an exit code.
To end the program, you should be using Ctrl + C .
From a normal Windows command prompt, ctrl+c will stop a node server running.
Doesn't
$ pkill node
work for you?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With