Load server config and use config values instead of hardcoded values

This commit is contained in:
Bilal
2020-05-08 10:46:18 +02:00
parent 2d1f226ab7
commit 89dbcf0d9f
4 changed files with 18 additions and 1 deletions

9
example.env Normal file
View File

@@ -0,0 +1,9 @@
# Check default values in kiviscraplib/config/config.go
WEB_SERVER_ADDRESS = Address in form of IP:PORT (127.0.0.1:1337) on which web server will listen for scrap requests
WEB_SERVER_API_KEY = API key that needs to be present in scrap request
WEB_SERVER_TIMEOUT = Number of seconds to wait for worker client before timeout-ing scrap requests
WORKER_SERVER_ADDRESS = Address in form of IP:PORT (127.0.0.1:1338) on which worker server will listen for worker clients
WORKER_SERVER_WORKERS_COUNT = Number of possible worker clients
WORKER_SERVER_REQUEST_MESSAGE_PREFIX = Prefix to prepend on the request message when sending to the worker client. Use double quotes if prefix has a space (eg. "URL ")