An example axum server that serves a live stream of its own tracing log to an HTML page
Go to file
2023-06-07 01:29:17 -04:00
src Example axum server with log stream page 2023-06-04 00:40:00 -04:00
.env Example axum server with log stream page 2023-06-04 00:40:00 -04:00
.gitignore Example axum server with log stream page 2023-06-04 00:40:00 -04:00
Cargo.lock Example axum server with log stream page 2023-06-04 00:40:00 -04:00
Cargo.toml Example axum server with log stream page 2023-06-04 00:40:00 -04:00
README.md Update README.md 2023-06-07 01:29:17 -04:00

axum-log-stream

An example axum server that serves a live stream of its own tracing log to an HTML page using Hotwire Turbo Streams.

https://github.com/thallada/axum-log-stream/assets/1505923/505b4d85-748c-4bb7-992d-d6f1dac314ad

Setup

A .env file should be at the root of the directory. Leave the default or change them to your desired values:

RUST_LOG=axum_log_stream=debug,tower_http=debug
HOST=127.0.0.1
PORT=3000
TITLE=axum-log-stream
MAX_MEM_LOG_SIZE=1000000

Running

cargo run