Skip to content

Commit

Permalink
put phantomjs production to comments as it is not ready in server side
Browse files Browse the repository at this point in the history
  • Loading branch information
santeriv committed Dec 26, 2013
1 parent 007c267 commit e0a0788
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions routes/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var https = require('follow-redirects').https
var sanitizer = require('sanitizer');
var vm = require('vm');
var domain = require('domain');
var os = require('os');
var phantomjsbin = /*os.platform() === 'sunos' ? __dirname+'/../bin/sunos_64/phantomjs' : */'phantomjs';
portscanner = require('portscanner');

exports.snapshot = function(req,res) {
Expand All @@ -24,7 +26,7 @@ exports.snapshot = function(req,res) {
/*add param and value to sitepath*/
snapshoturl = snapshoturl + pair;
}
});
});
takesnapshot(snapshoturl,res);
}

Expand All @@ -46,7 +48,7 @@ function takesnapshot(snapshoturl,response) {
PhantomReturn.prototype = new Error();\n\
PhantomReturn.prototype.constructor = PhantomReturn;\n\
portscanner.findAPortNotInUse(40000, 60000, "localhost", function(err, freeport) {\n\
phantom.create({"port": freeport},function(ph) {\n\
phantom.create({"binary":"'+phantomjsbin+'","port": freeport},function(ph) {\n\
ph.createPage(function(page){\n\
page.set("onLoadFinished",function(status) { \n\
console.log("phantom load finished status=",status);\n\
Expand Down

0 comments on commit e0a0788

Please sign in to comment.