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.
wasp-ws-reading-service can be run in a similar way to most nodejs applications. First install required dependencies using npm:
npm installwasp-ws-reading-service depends on Kafka which can be brought locally up using docker:
docker-compose up -dAnd finally you can run the application in development mode with:
npm run devOr run tests with:
npm testwasp-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 |