Added docs about the wsserver.scheme config setting

This commit is contained in:
Troy McConaghy 2017-06-16 13:22:01 +02:00
parent 571ee83731
commit e41ac6c634

View File

@ -182,12 +182,14 @@ export BIGCHAINDB_SERVER_THREADS=5
``` ```
## wsserver.host and wsserver.port ## wsserver.scheme, wsserver.host and wsserver.port
These settings are for the These settings are for the
[aiohttp server](https://aiohttp.readthedocs.io/en/stable/index.html), [aiohttp server](https://aiohttp.readthedocs.io/en/stable/index.html),
which is used to serve the which is used to serve the
[WebSocket Event Stream API](../websocket-event-stream-api.html). [WebSocket Event Stream API](../websocket-event-stream-api.html).
`wsserver.scheme` should be either `"ws"` or `"wss"`
(but setting it to `"wss"` does *not* enable SSL/TLS).
`wsserver.host` is where to bind the aiohttp server socket and `wsserver.host` is where to bind the aiohttp server socket and
`wsserver.port` is the corresponding port. `wsserver.port` is the corresponding port.
If you want to allow connections from anyone, on port 9985, If you want to allow connections from anyone, on port 9985,
@ -195,6 +197,7 @@ set `wsserver.host` to 0.0.0.0 and `wsserver.port` to 9985.
**Example using environment variables** **Example using environment variables**
```text ```text
export BIGCHAINDB_WSSERVER_SCHEME=ws
export BIGCHAINDB_WSSERVER_HOST=0.0.0.0 export BIGCHAINDB_WSSERVER_HOST=0.0.0.0
export BIGCHAINDB_WSSERVER_PORT=9985 export BIGCHAINDB_WSSERVER_PORT=9985
``` ```
@ -202,6 +205,7 @@ export BIGCHAINDB_WSSERVER_PORT=9985
**Example config file snippet** **Example config file snippet**
```js ```js
"wsserver": { "wsserver": {
"scheme": "wss",
"host": "0.0.0.0", "host": "0.0.0.0",
"port": 65000 "port": 65000
} }
@ -210,6 +214,7 @@ export BIGCHAINDB_WSSERVER_PORT=9985
**Default values (from a config file)** **Default values (from a config file)**
```js ```js
"wsserver": { "wsserver": {
"scheme": "ws",
"host": "localhost", "host": "localhost",
"port": 9985 "port": 9985
} }