Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn off Node.js Server Once Running on Localhost

Tags:

node.js

This is probably a simple question but I can't find a clear answer anywhere. I am trying Hello World on node.js. I have a node.js server running on port 8000 of the localhost, turned on via the command line e.g. "node helloworld.js". Helloworld.js runs fine via localhost:8000. Now when I try turn on another server on port 8000 though I get the error "listen EADDRINUSE" because the first server is still running. So how do I turn off the first node server?

like image 600
Owen Avatar asked Feb 09 '13 21:02

Owen


People also ask

How do I stop npm local server?

Once you press enter you should then see a message printed in the terminal saying the app is listening on port 3000, which means it's working. If you ever need to stop the server, you can just press Ctrl + C in the terminal and that will kill it. You can then restart it again by typing npm run serve again.

How do I stop NodeJS from starting?

You can start a node by using the startNode command. You can stop a node by using the stopNode command.

How do I start stop restarting a node js server process?

Log in as superuser to the node on which you want to stop the Netra HA Suite software. Create the not_configured file on the node. Reboot the node as described in To Perform a Clean Reboot of a Solaris OS Node or To Perform a Clean Reboot of a Linux Node. The node restarts without the Foundation Services running.


1 Answers

Just kill the process by doing ctrl-c...

like image 128
drorw Avatar answered Sep 28 '22 01:09

drorw