daniel-sc / casperjs-cartridge Goto Github PK
View Code? Open in Web Editor NEWCasperJS / PhantomJS cartridge for openshift
License: Other
CasperJS / PhantomJS cartridge for openshift
License: Other
Hello. Thank you for putting together this cartridge.
It might be just me being new to OpenShift but I'm having trouble creating my app with the custom cartridge you provided. Can you point me in the right direction? Thanks.
$ rhc app-create aim https://raw.githubusercontent.com/daniel-sc/casperjs-cartridge/mast
er/metadata/manifest.yml
DL is deprecated, please use Fiddle
The cartridge
'https://raw.githubusercontent.com/daniel-sc/casperjs-cartridge/master/metadata/manifest.yml'
will be downloaded and installed
Application Options
-------------------
Domain: aimnotifier
Cartridges: https://raw.githubusercontent.com/daniel-sc/casperjs-cartridge/master/metadata/manifest.yml
Gear Size: default
Scaling: no
Creating application 'aim' ...
An application must contain one web cartridge. None of the specified cartridges is a web
cartridge. Please include one of the following cartridges: diy-0.1, jboss-dv-6.0.0,
jboss-unified-push-1, jboss-vertx-2.1, jboss-wildfly-8, jbossas-7, jbosseap-6,
jbossews-1.0, jbossews-2.0, jenkins-1, nodejs-0.10, nodejs-0.6, perl-5.10, php-5.3,
php-5.4, python-2.6, python-2.7, python-3.3, ruby-1.8, ruby-1.9, ruby-2.0, zend-5.6, and
zend-6.1 or supply a valid url to a custom web_framework cartridge.
Hi there. I've installed PhantomJS and the sgentle NPM module (https://github.com/sgentle/phantomjs-node/wiki) on Mac OS X and it works as expected in a Node script:
var phantom = require('phantom');
phantom.create(function (ph) {
// code removed for server, works locally
});
Next I installed your cartridge onto an existing NodeJS app in OpenShift. The Casper and Phantom environment worked, echoing the version successfully. However even with the simplistic code above, this error is thrown:
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js:905:11)
at Server._listen2 (net.js:1024:19)
at listen (net.js:1065:10)
at net.js:1147:9
at asyncCallback (dns.js:68:16)
at Object.onanswer as oncomplete
DEBUG: Program node server.js exited with code 8
I'm assuming from googling that I need to set the options for Phantom, but how do I get these from the OpenShift environment? For example, setting the path to "/var/lib/openshift/xxxxxxx/casperjs/phantomjs/bin/" doesn't make any difference. How about IP address and port? Any other ideas? Is there a better NodeJS module for using your cartridge?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.