Can any one please help me fix this so I can get it to work without the variables set and with my proxy and email hardcoded. The script bellow throws me an error
The node command to start my node script is :
node new.js "proxy" "email"
Code of new.js script :
sys = require('sys')
var exec = require('child_process').exec;
var value = process.argv[2];
var value1 = process.argv[3];
function puts(error, stdout, stderr) {sys.puts(stdout)}
exec("casperjs test.js" value value1, puts);
Here is the error I receive:
/root/new.js:11
exec("casperjs test.js" value value1, puts);
^^^^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3