Skip to content

Commit

Permalink
Week-4 added the Wechaty environment variables (#933)
Browse files Browse the repository at this point in the history
* 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
3 people authored Jul 18, 2021
1 parent 73a85cc commit 7765747
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docusaurus/docs/specs/wechaty.md
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"``` |

0 comments on commit 7765747

Please sign in to comment.