Skip to content

Commit d0ff94c

Browse files
author
Robin Gottfried
committed
documentation
1 parent 716a67f commit d0ff94c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ node run server
3131

3232
By default, server launches on port **8090**.
3333

34+
Server accepts these environamental variables:
35+
36+
- ADDRESS ... TCP/IP address to listen on (default: localhost)
37+
- PORT: ... TCP/IP port number to bind to (default: 8090)
38+
- KEY_SERVER_URL ... URL to a key server. When set, WS Server will call GET
39+
request on ``<KEY_SERVER_URL>/key/<client-key>"```. If the othe party
40+
responds with other status code than 200, the connecting client is
41+
immediatelly disconnected.
42+
If KEY_SERVER_URL is undefined, client with any key can connect (default: undefined).
43+
3444
## Connecting a client to the server
3545

3646
Using websocket-proxy client, you can connect your service in your isolated

config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ let CONFIG = {
1010
server: {
1111
host: val('ADDRESS', 'localhost'),
1212
port: val('PORT', '8090'),
13-
// authenticator config
14-
// null - no authenticator (allow any key to pass)
13+
// key server url
14+
// empty value means no authenticator (allow any key to connect)
1515
// http(s)://... - a url for key-master APIs
16-
keyServerUrl: val('AUTHENTICATOR', undefined),
16+
keyServerUrl: val('KEY_SERVER_URL', undefined),
1717
},
1818
client: {
1919
key: val('KEY', 'client-1'),

0 commit comments

Comments
 (0)