Node.js build system in Sublime Text 2

{
    "cmd": ["node","$file"]
}

works perfectly for me in windows and it shows the output in the sublime window. Although I dont know how to stop the server after from sublime, I have to search and kill the node process.

Also, check node is in your PATH ;)

Hope it works for you.


Mac users, type which node in terminal. It outputs the path of the node executable, which in most cases is /usr/local/bin/node. Now create a new build system (Tools > Build System > New Build System) with the following settings in Sublime Text.

{   
  "cmd": ["/usr/local/bin/node", "$file"],   
  "selector": "source.js"   
}