I need to create a page using nodejs, which will contain an "on / off" button. When I press this button I want to call the same route, but pass a parameter: on / off or 0/1, etc. When making this call, I will treat the received parameter and then execute a script called "connect.js" or "disconnect.js". These scripts will be in the same folder as the server. I figured that in "File System" there would be something like PHP's "exec ()" function, but I did not find it. In PHP, for example, something like exec( "/meu_path/meu_script.js $onOff");
could be done. How do I run a script on the Node?