make serve work

This commit is contained in:
Sebastian Hugentobler 2023-03-14 12:42:54 +01:00
parent 339f9626d2
commit 14ab9bf469
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
3 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,8 @@ check:
cargo deny check
serve: wasm
cargo run --package woweb
cd woweb; \
cargo run
release: $(DIST_DIR) wasm
cargo build --package woweb --release

View File

@ -1,13 +1,13 @@
use axum::routing::get;
use axum::Router;
use axum_extra::routing::SpaRouter;
use dist_text::text::Text;
use std::env;
use std::net::SocketAddr;
use std::sync::Arc;
use tokio::sync::{broadcast, RwLock};
use tower_http::trace::TraceLayer;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
use dist_text::text::Text;
mod ws;

View File

@ -9,8 +9,8 @@ use axum::{
response::IntoResponse,
};
use futures::{sink::SinkExt, stream::StreamExt};
use dist_text::crdts::list::Op;
use futures::{sink::SinkExt, stream::StreamExt};
use crate::AppState;
@ -84,6 +84,5 @@ async fn handle_socket(stream: WebSocket, state: Arc<AppState>) {
tokio::select! {
_ = (&mut send_task) => recv_task.abort(),
_ = (&mut recv_task) => send_task.abort(),
}
;
};
}