When developing Nodejs, use sublime software, which has a lot of startup methods. can also use Supersivor of course can take advantage of Nodejs's own function through ctrl+b to start directly.
How to set it up:
1) Download sublime and install, download list: http://www.jb51.net/softs/132432.html
2) Download Sublime Nodejs plug-in, need to be integrated Nodejs plug-in to sublime,: Https://github.com/tanepiper/SublimeText-Nodejs
3) Unzip the zip file and rename the folder "Nodejs"
4) Open Sublime, operation "preference"-"Browse packages", open a directory, this directory is the location of many language IDE plug-ins.
5) Copy the "Nodejs" folder to this directory. Is that OK? The sauce does not work, and you need to change the configuration file.
6) Then set the basic settings for the Nodejs plugin:
Preferences--Plug-in Settings--nodejs--Setting-default
Modify the following settings, that is, modify the Node_command and Npm_command for your own computer corresponding to the path
{ //save before running commands "Save_first":true, //if present, use the This command instead of plain "node"//e.g. "/usr/bin/node" or "C:\bin\node.exe" "Node_command":"C:\\Program Files\\nodejs\\node.exe", //same for NPM command "Npm_command":"C:\\Program Files\\nodejs\\npm.cmd", //As ' node_path ' environment variable for NODE runtime "Node_path":false, "Expert_mode":false, "Ouput_to_new_tab":false}
8) Then: Preferences--Browse plugins,
Locate the configuration file Nodejs.sublime-build under the Nodejs plugin.
The most important of these is the following sentence:
"cmd": ["taskkill/f/im Node.exe & Node", "$file"]
The idea is to kill the current process before starting a new thread. Otherwise it will newspapers the mouth is occupied error.
1 {2 "cmd": ["node","$file"],3 "File_regex":"^[]*file \ "(... *?) \ ", line ([0-9]*)",4 "selector":"Source.js",5 "Shell":true,6 "encoding":"UTF-8",7 "Windows":8 {9 "cmd": ["taskkill/f/im node.exe & Node","$file"]Ten }, One "Linux": A { - "cmd": ["killall node; node","$file"] - }, the "OSX": - { - "cmd": ["killall node, node $file"] - } +}
At this point, you can safely use Ctrl+b to run your Nodejs program.
Nodejs ctrl+b shortcut key settings