Replaces actix with axum for web, allows us to use socket.io and gives us access to the tower ecosystem of middleware breaks compatibility with our current websocket implementation, needs to be reimplemented for socket.io
16 lines
247 B
Rust
16 lines
247 B
Rust
use std::sync::Arc;
|
|
|
|
use axum::{
|
|
Router,
|
|
routing::{get, post},
|
|
};
|
|
|
|
use crate::AppState;
|
|
|
|
mod id;
|
|
|
|
pub fn router() -> Router<Arc<AppState>> {
|
|
Router::new()
|
|
.route("/{id}", get(id::get))
|
|
.route("/{id}", post(id::join))
|
|
}
|