Skip to content

Commit

Permalink
Set the host and port by default
Browse files Browse the repository at this point in the history
  • Loading branch information
danielwestendorf committed Jun 13, 2018
1 parent 3a2ba50 commit 7245741
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -10,7 +10,6 @@ before_install:
do
sleep 1
done
- which google-chrome-stable
script:
- npm run testncov
# after_success:
Expand Down
9 changes: 6 additions & 3 deletions lib/render.js
Expand Up @@ -7,12 +7,15 @@ const CompletionTrigger = require('./pdf/completion-trigger')
module.exports = class Render {
constructor(htmlString, options) {
this.htmlString = htmlString
this.options = options || {}
this.options = options || {
host: 'localhost',
port: 9222
}

this.log = debug(this.options.log || 'breezy-pdf-lite:pdf')

if (process.env.GOOGLE_CHROME_SHIM !== undefined) {
this.options.host = 'localhost'
this.options.port = 9222
process.env.CHROME_PATH = process.env.GOOGLE_CHROME_SHIM
}
}

Expand Down

0 comments on commit 7245741

Please sign in to comment.