Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Phantomjs config support #72

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions config/phantom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
/* Same as: --ignore-ssl-errors=true */
"ignoreSslErrors": true,

/* Same as: --ssl-protocol=tlsv1 */
"sslProtocol": "any",

/* Same as: --max-disk-cache-size=1000 */
"maxDiskCacheSize": 1000,

/* Same as: --output-encoding=utf8 */
"outputEncoding": "utf8"

/* etc. */
}

2 changes: 1 addition & 1 deletion lib/rasterizerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RasterizerService.prototype.rasterizerExitHandler = function (code) {
};

RasterizerService.prototype.startService = function() {
var rasterizer = spawn(this.config.command, ['scripts/rasterizer.js', this.config.path, this.config.host + ':' + this.config.port, this.config.viewport]);
var rasterizer = spawn(this.config.command, ['--config=config/phantom.json', 'scripts/rasterizer.js', this.config.path, this.config.host + ':' + this.config.port, this.config.viewport]);
rasterizer.stderr.on('data', function (data) {
console.log('phantomjs error: ' + data);
});
Expand Down