From d0ff94cfc5845d096c471ffed00aa3feea840b54 Mon Sep 17 00:00:00 2001 From: Robin Gottfried Date: Thu, 14 May 2020 18:49:36 +0200 Subject: [PATCH] documentation --- README.md | 10 ++++++++++ config.js | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d230cc1..ba7deb5 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,16 @@ node run server By default, server launches on port **8090**. +Server accepts these environamental variables: + +- ADDRESS ... TCP/IP address to listen on (default: localhost) +- PORT: ... TCP/IP port number to bind to (default: 8090) +- KEY_SERVER_URL ... URL to a key server. When set, WS Server will call GET + request on ``/key/"```. If the othe party + responds with other status code than 200, the connecting client is + immediatelly disconnected. + If KEY_SERVER_URL is undefined, client with any key can connect (default: undefined). + ## Connecting a client to the server Using websocket-proxy client, you can connect your service in your isolated diff --git a/config.js b/config.js index 9ba7103..342af4b 100644 --- a/config.js +++ b/config.js @@ -10,10 +10,10 @@ let CONFIG = { server: { host: val('ADDRESS', 'localhost'), port: val('PORT', '8090'), - // authenticator config - // null - no authenticator (allow any key to pass) + // key server url + // empty value means no authenticator (allow any key to connect) // http(s)://... - a url for key-master APIs - keyServerUrl: val('AUTHENTICATOR', undefined), + keyServerUrl: val('KEY_SERVER_URL', undefined), }, client: { key: val('KEY', 'client-1'),