I am trying to execute a javascript file through nodejs on xampp. I am using a php code to first execute the javascript file in terminal and output the result.
<?php
exec('node crawl.js', $x);
print_r($x);
?>
The command runs fine in terminal, but running through this php script on localhost return nothing.
I have executed many commands (like ls, cd etc.) and all work fine.