File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ //! # Livelocd
2+ //!
3+ //! **Livelocd** is a lightweight Axum-compatible plugin for real-time location tracking using WebSockets.
4+ //!
5+ //! ## Features
6+ //!
7+ //! - Send location updates via WebSocket
8+ //! - Broadcast to all or specific subscribers
9+ //! - Query all users or specific ones via REST
10+ //!
11+ //! ## Usage
12+ //! ```rust
13+ //! use axum::{Router};
14+ //! use livelocd::livelocd_routes;
15+ //!
16+ //! let app = Router::new().merge(livelocd_routes());
17+ //! ```
18+ //!
19+ //! ## WebSocket Endpoints
20+ //!
21+ //! - `GET /ws/send-location`: Send JSON like `{"user_id": "user123", "location": "33.75,-84.38"}`
22+ //! - `GET /ws/subscribe`: Subscribe to all location updates
23+ //! - `GET /ws/subscribe/:user_id`: Subscribe to a single user’s updates
24+ //!
25+ //! ## REST API Endpoints
26+ //!
27+ //! - `GET /api/users`: Get all tracked user locations
28+ //! - `GET /api/users/:user_id`: Get location for a single user
29+ //!
30+ //! ## License
31+ //! MIT © [Bailey Burnsed](https://github.com/Burnsedia)
32+
133mod handlers;
234mod state;
335
You can’t perform that action at this time.
0 commit comments