Caution
This repository has been archived and is no longer maintained.
This log streaming service was part of an older architecture where test results were streamed to students via Redis and WebSocket. Dot Code School now uses a fully static pipeline with no backend services.
See dotcodeschool/frontend for the current platform.
A Rust-based service that streams logs from Redis to connected clients via WebSocket.
- Rust toolchain (latest stable)
- Docker (for containerized deployment)
# Build the project
cargo build
# Run in development mode
cargo run# Run tests
cargo testThe service is configured through environment variables:
# Redis connection
REDIS_URL=redis://default:password@redis:6379
# WebSocket server
WS_PORT=8080 # Port to listen on for WebSocket connectionsBuild and run using Docker:
# Build the image
docker build -t dcs-log-streamer .
# Run the container
docker run -d \
-p 8080:8080 \
-e REDIS_URL=redis://default:password@redis:6379 \
dcs-log-streamerThe log streamer:
- Connects to Redis and subscribes to log channels
- Listens for WebSocket connections from clients
- Forwards logs from Redis to connected clients in real-time
- Handles client disconnections and reconnections gracefully
This project is licensed under the WTFPL - Do What The Fuck You Want To Public License.