Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js script running, but it won't stop!

Tags:

node.js

centos

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?

like image 965
Kriem Avatar asked Jun 27 '11 17:06

Kriem


People also ask

How do I stop a node script from running?

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.

How do I stop node js from command line?

To end the program, you should be using Ctrl + C .

How do I stop a node server from running VS code?

From a normal Windows command prompt, ctrl+c will stop a node server running.


1 Answers

Doesn't

$ pkill node

work for you?

like image 151
YXD Avatar answered Oct 08 '22 08:10

YXD