提交 14935d42 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

env variables doc

上级 a9c5617a
......@@ -228,8 +228,13 @@ const bot = new Wechaty(options)
options:
1. `session`: session name. if a session name is provided, the login status will be saved to it, and automatically restored on next time of wechaty start(restart).
1. `session`(OPTIONAL): session name. if a session name is provided, the login status will be saved to it, and automatically restored on next time of wechaty start(restart).
* can be set by environment variable: `WECHATY_SESSION`
1. `head`(OPTIONAL): specify the browser name for webdriver.
* can be set by environment variable: `WECHATY_HEAD`
* values:
* `phantomjs`: it's the default behaviour if head is not set.
* `chrome`
### Wechaty.init()
Initialize the bot, return Promise.
......
......@@ -13,8 +13,9 @@ const By = WebDriver.By
const PuppetWebBrowser = require('../src/puppet-web-browser')
const PuppetWebBridge = require('../src/puppet-web-bridge')
const PORT = 58788
const HEAD = 'chrome' // undefined
const PORT = process.env.WECHATY_PORT || 58788
const HEAD = process.env.WECHATY_HEAD || false
function driverProcessNum() {
return new Promise((resolve, reject) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册