I am unable to execute the node server.js file from php code but when I executes it from terminal it works fine.
<?php exec('/usr/local/bin/node Sever.js'); ?>
I am unable to execute the node server.js file from php code but when I executes it from terminal it works fine.
<?php exec('/usr/local/bin/node Sever.js'); ?>
I was able to execute the file. First get full path to node. Run in terminal < which node > then add web path of your js file in exec function.
Check here Calling node.js script from PHP returns nothing
exec('/usr/local/bin/node '.WEB_PATH.'/Server.js');