I don't really understand how to us PhantomJS in my webpage... I've been able to use as a binary on Windows but now need to include in my web app online.
I've installed the Linux version and gotten the source on my machine, but how to actually use it? This is my very simply hello word test below. I thought I would open the console see "Hello World!" but nothing happens. What am I doing wrong? And even in hello.js, where do we actually call the phantomjs executable?
<html><head>
<script type='text/javascript' src='js/hello.js' />
<script>
console.log('Hello, world!');
phantom.exit();
</script>
</head>
<body>
</body>
</html>
Hello.js, as on the webisite:
console.log('Hello, world!');
phantom.exit();
By the way, I'm running CentOS and I got the tarball for PhantomJS and unpacked it into my main www folder, I'm not sure what to do? I ran phantomjs --version on the linux prompt but it doesn't recognize it.