From da021a6fad06e766f5f63b225e7516b6ca06989c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huan=20=28=E6=9D=8E=E5=8D=93=E6=A1=93=29?= Date: Thu, 11 Feb 2021 16:46:29 +0800 Subject: [PATCH] Update README.md --- README.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ea48d06..7cd8929 100644 --- a/README.md +++ b/README.md @@ -72,16 +72,26 @@ npm install ### 4 Run the Bot -```sh -npm start -``` +You can use `export` to set environment variables in Linux, and use `set` in Windows. -Or use node to run bot directly +#### Linux ```shell -# Linux: export WECHATY_LOG=verbose -# Win32: set WECHATY_LOG=verbose -npx ts-node examples/ding-dong-bot.ts +export WECHATY_LOG=verbose +export WECHATY_PUPPET=wechaty-puppet-puppeteer +npm start +# the above is equals to the below command: +# npx ts-node examples/ding-dong-bot.ts +``` + +#### Windows + +```shell +set WECHATY_LOG=verbose +set WECHATY_PUPPET=wechaty-puppet-puppeteer +npm start +# the above is equals to the below command: +# npx ts-node examples/ding-dong-bot.ts ``` You are all set!