Skip to content

Commit 385fb51

Browse files
committed
zulip-botserver: Document use of environment var in README.md
1 parent bcf183d commit 385fb51

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

zulip_botserver/README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
```
22
zulip-botserver --config-file <path to botserverrc> --hostname <address> --port <port>
3-
43
```
54

65
Example: `zulip-botserver --config-file ~/botserverrc`
76

87
This program loads the bot configurations from the
9-
config file (botserverrc here) and loads the bot modules.
8+
config file (`botserverrc`, here) and loads the bot modules.
109
It then starts the server and fetches the requests to the
1110
above loaded modules and returns the success/failure result.
1211

13-
Please make sure you have a current botserverrc file with the
14-
configurations of the required bots.
15-
Hostname and Port are optional arguments. Default hostname is
16-
127.0.0.1 and default port is 5002.
12+
The `--hostname` and `--port` arguments are optional, and default to
13+
127.0.0.1 and 5002 respectively.
14+
15+
The format for a configuration file is:
16+
17+
[helloworld]
18+
key=value
19+
20+
site=http://localhost
21+
token=abcd1234
22+
23+
Is passed `--use-env-vars` instead of `--config-file`, the
24+
configuration can instead be provided via the `ZULIP_BOTSERVER_CONFIG`
25+
environment variable. This should be a JSON-formatted dictionary of
26+
bot names to dictionary of their configuration; for example:
27+
28+
ZULIP_BOTSERVER_CONFIG='{"helloworld":{"email":"[email protected]","key":"value","site":"http://localhost","token":"abcd1234"}}' \
29+
zulip-botserver --use-env-vars

0 commit comments

Comments
 (0)