-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Week-4 added the Wechaty environment variables (#933)
* Week-3 added the Wechaty environment variables This PR contains the details about the environment variable in Wechaty * Update wechaty.md * Update wechaty.md Co-authored-by: Rohitesh Kumar Jain <[email protected]> Co-authored-by: lijiarui <[email protected]>
- Loading branch information
1 parent
73a85cc
commit 7765747
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
--- | ||
title: Polyglot Wechaty | ||
title: Wechaty Environment Variables | ||
sidebar_label: Wechaty | ||
--- | ||
|
||
Polyglot Wechaty is ... (tbw) | ||
Wechaty requires different environment variables to implement the bot. In this section, you will learn how to use the various environment variables. | ||
|
||
## Environment Variables | ||
|
||
1. `WECHATY_LOG`: `silly`, `verbose`, `info`, `warn`, `silent` | ||
1. `WECHATY_PUPPET_SERVICE_TOKEN` | ||
1. `WECHATY_PUPPET_SERVICE_ENDPOINT` | ||
| Environment variable | Description | Usage | | ||
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------| | ||
| WECHATY_PUPPET | defines the Wechaty Puppet Provider NPM name and its parameters | ```bash export WECHATY_PUPPET=wechaty-puppet-service export WECHATY_PUPPET_SERVICE_TOKEN="__TOKEN__"``` | | ||
| WECHATY_TOKEN | initializes the unique Wechaty Puppet Service Token, that is generating using the [UUID Generator](https://www.uuidgenerator.net/version4). | ```bash export WECHATY_TOKEN='2fdb00a5-5c31-4018-84ac-c64e5f995057'``` | | ||
| WECHATY_PUPPET_SERVER_PORT | sets up the free server port for the Wechaty Puppet Service, also used for docker port mapping | ```bash export WECHATY_PUPPET_SERVER_PORT=8788``` | | ||
| WECHATY_LOG | sets up the log mode for the service. Usually initialize the variable to `Verbose` mode as this gives more debug log messages. `verbose` mode is an option available in many OS that gives details on what the computer is doing, which drivers and software are being installed or loaded and many more. | ```bash export WECHATY_LOG="verbose"``` | |