gwuhaolin / chrome-render

general server render base on headless chrome
95 stars 10 forks source link

Configure host/port #9

Closed ttonyh closed 7 years ago

ttonyh commented 7 years ago

I'm not seeing a way to configure the Chrome Headless server's host and port. This is important since the headless server is not always running on same machine as the pre-render module.

The options will need to be updated in 'chrome-pool' as well to pass into CDP.

gwuhaolin commented 7 years ago

add support in https://github.com/gwuhaolin/chrome-render/releases/tag/1.3.0

use it like this:

const chromeRender = await ChromeRender.new({
  chromeRunnerOptions:{
      port:8888,
      chromePath:'/path/to/chrome.exe'
  }
});

chromeRunnerOptions use detail see https://github.com/gwuhaolin/chrome-runner#options