How to remotely fetch answer of phantomjs script run on heroku? How to remotely fetch answer of phantomjs script run on heroku? heroku heroku

How to remotely fetch answer of phantomjs script run on heroku?


If I understand you correctly you're talking about interprocess communication - so that Phantom's result (the page HTML) can somehow be retrieved by the app.

per the phantom docs, couple options:

  • write the HTML to a file and pick up the file in your app
  • run the webserver module and do a GET to phantom, and have the phantom script respond with the page HTML

see http://phantomjs.org/api/webserver/