Im new to node.js and this is my question:
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).
So:
$( ".button" ).on( "click", function() {
//run ajax to node with command for example "node socket.io"
});
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.
EDIT
But is it possible to run ajax request with that node command to node.js and then fire up it up ("node socket.io")?
Im asking this because I want to start and stop socket.io from web application, not from console command directly.
node remote-start.js) anyway, so why not just start socket.io directly?