Coder Social home page Coder Social logo

Comments (5)

thoop avatar thoop commented on June 18, 2024

You need to pass a different port into the phantomjs-node bridge as well. Since that uses a socket server to drive phantomjs remotely from the node process.

https://github.com/sgentle/phantomjs-node/blob/master/phantom.js#L78

Let me know if you get it working.

from prerender.

passion8 avatar passion8 commented on June 18, 2024

Can you give me example. I used environment ($PORT) variable to assign port to nodejs. How can i pass the option with command line ?

from prerender.

thoop avatar thoop commented on June 18, 2024

Code will have to be added to pass a different port to the phantomjs-node bridge.

You'll have to change the code to pass port into the phantomjs-node bridge on your own here:
https://github.com/collectiveip/prerender/blob/master/lib/prerender.js#L26

Add
port: process.env.PHANTOMJS_PORT
12300 is the default phantomjs port so you can change it to something other than that for each instance you run.

I'll try to add this soon. Or feel free to make a pull request if you get it working :)

from prerender.

alessiosantocs avatar alessiosantocs commented on June 18, 2024

Now you can! I have made a pull request to make it work!

from prerender.

thoop avatar thoop commented on June 18, 2024

Fixed in #37

from prerender.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.