Saturday, February 27, 2016

Run Node.JS within Sublime Text editor

Step 1: Open "Sublime Text 2" editor
Step 2: Tools -> Build System -> New Build System
Step 3: New tab appears. Replace the content with the following lines.

{
"cmd": ["node", "$file", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "*.js"
}

Step 4: Save the file and rename it with "NodeJS.sublime-build".
Step 5: Select "Tools -> Build System -> NodeJS"
Step 6: Go to your source program and press "Ctrl-B" to run code.

2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete