Module web

Module web 

Source
Expand description

HTTP and WebSocket server built on Axum.

Routes:

  • GET /ws โ€” WebSocket endpoint (terminal I/O)
  • GET /api/v1/ping โ€” health check
  • GET / and GET /*path โ€” embedded static frontend

Modulesยง

health ๐Ÿ”’
Health-check endpoint (GET /api/v1/ping).
static_files ๐Ÿ”’
Static file serving with compile-time embedded frontend assets.
ws ๐Ÿ”’
WebSocket handler implementing the tty-web binary protocol.

Structsยง

AppState
Shared state passed to all request handlers.

Functionsยง

router
Build the Axum router with all routes and shared state.