0

I have a Node Server and I need to call some PhantomJS commands from NodeJS server. Like this command.

phantomjs phantom-server.js http://example.com

I got some answers on this topic on the following question. But it's not so clear what are the arguments I have to pass for that.

Is it possible to run PhantomJS from node.js as a command line argument

In this example there's a line like folloes.

'some other argument (passed to phantomjs script)'

And I can't figure it out what to pass there.

Community
  • 1
  • 1
Root SL
  • 69
  • 1
  • 6
  • See http://stackoverflow.com/a/33992664/2715393 – Vaviloff Jan 01 '17 at 13:24
  • Besides the direct Phantomjs process execution, it is possible to use server module to directly communicate with the server process http://phantomjs.org/api/webserver/method/listen.html – Risto Novik Jan 01 '17 at 14:04

1 Answers1

0

It means that in the childArgs array, other than the path to your phantomjs script, you can also add the arguments required by your script. So if you wanted to execute

phantomjs phantom-server.js http://example.com

you would pass the string 'http://example.com' along with your script's path.