I've installed PhantomJS in my Meteor app using the instructions in the answer here: Installing/Using Phantom.js with Meteor but the method involved:
(private/phantomDriver.js)
var page = require('webpage').create();
page.open('http://github.com/', function (){
console.log('Page Loaded');
page.render('github.png');
phantom.exit();
});
has a set URL... how can I pass parameters to the file to change the URL? e.g.
page.open(URL, etc...)
This:
var URL = newURL
spawn(phantomjs.path, ['assets/app/phantomDriver.js', URL]);
Logs
"stdout: ReferenceError: Can't find variable: URL" to the console.