Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restart/stop a nodejs server within Sublime Text 2? [closed]

I used Sublime Text 2 to download the nodejs package (https://github.com/tanepiper/SublimeText-Nodejs), but I can't seem to find a way that will restart or stop the server besides my having to go into the task manager and killing the process. When using the command provided by the plugin to run the file with node, it doesn't give you any kind of command window, so Ctrl+C won't work.

I've found a couple hackish way of doing things such as a .bat file that looks up the process running on a specific port, then killing it. Then there are a couple linux commands that don't benefit me since I'm on Windows.

I was hoping someone on here would see this and know a solution I could use to easily start and stop the node server for development.

like image 530
Justen Avatar asked Jul 05 '12 20:07

Justen


People also ask

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

js Automatic restart Node. js server with nodemon. In this case, if we make any changes to the project then we will have to restart the server by killing it using CTRL+C and then typing the same command again.

How do I stop a live server in Sublime Text?

If you want to stop running the server (meaning your app will no longer be available on localhost), you should be able to use ctrl + c to stop any running processes in the current terminal tab.


1 Answers

If you build your server from sublime using the ctrl+b command it will run the server and then you can kill it by using the default ctrl+break command. Since I am on a laptop that doesn't have a break key I modified the key binding to be something I do have (ctrl+alt+k).

like image 103
dylntrnr Avatar answered Sep 28 '22 07:09

dylntrnr