title: How to execute node (console) command from javascript file on click via ajax
body: <p>Im new to node.js and this is my question:</p>
  
  <p>For example: I got web application and from that application I have a button and on button click I want to run node console command (for example: node socket.io).</p>
  
  <p>So:</p>
  
  <pre><code>$( ".button" ).on( "click", function() {
     //run ajax to node with command for example "node socket.io"
   });
  </code></pre>
  
  <p>So in this example I want to start socket.io from web javascript file.  How to do it ? I know its very basic question but I want to understand how to do it or is it even possible.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>But is it possible to run ajax request with that node command to node.js and then fire up it up ("node socket.io")? </p>
  
  <p><strong>Im asking this because I want to start and stop socket.io from web application, not from console command directly.</strong></p>