Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

digicatapult/wasp-ws-reading-service

wasp-ws-reading-service

Deprecation Notice

WASP was deprecated on March 14th 2024, there will be no further dependency or security updates to this platform.

WebSocket connection for the wasp-reading-service.

Getting started

wasp-ws-reading-service can be run in a similar way to most nodejs applications. First install required dependencies using npm:

npm install

wasp-ws-reading-service depends on Kafka which can be brought locally up using docker:

docker-compose up -d

And finally you can run the application in development mode with:

npm run dev

Or run tests with:

npm test

Environment Variables

wasp-ws-reading-service is configured primarily using environment variables as follows:

variable required default description
LOG_LEVEL N info Logging level. Valid values are [trace, debug, info, warn, error, fatal]
PORT N 80 Port on which the service will listen
KAFKA_LOG_LEVEL N nothing Log level to use for the Kafka connection. Choices are debug, info, warn, error or nothing
KAFKA_BROKERS N localhost:9092 Comma separated list of Kafka brokers to connect to
KAFKA_NOTIFICATION_READINGS_TOPIC N reading-notification Topic to listen for new reading notifications
WS_PING_INTERVAL_MS N 500 Ping interval in milliseconds to keep WebSocket connection alive