how can you start the node server if you make a button on the page or by pressing the dom element

  • If you are given an exhaustive answer, mark it as accepted ^ _ ^ - Suvitruf

1 answer 1

In php there is an exec , you can use the process to start it:

 exec("node /path/to/my/script/myscript.js &", $output); 
  • and what does the & and $ output sign mean? - vkt
  • & indicates that the script continues to work even after the php script completes. In the $output variable, the node output of the script is written. - Suvitruf