node-phantom icon indicating copy to clipboard operation
node-phantom copied to clipboard

How do you set a custom port?

Open krokhale opened this issue 10 years ago • 2 comments

So this works on the other hacky node phantom package, but not on this package:

phantom.create 
        port: <randomFreePort>
, (ph) ->

But i get something like this:

TypeError: object is not a function

What is the correct way to pass a port option?

Thanks!

krokhale avatar Mar 14 '14 13:03 krokhale

And i also tried this:

phantom.create null,
    parameters: {port: <randomFreePort>}
, (ph) ->

Now i get

phantom crash: code 0
phantom crash: code 0
phantom stderr: Error: Unknown option: port

krokhale avatar Mar 14 '14 13:03 krokhale

YES! I need to set a custom port also!!

oreporan avatar Apr 24 '14 10:04 oreporan