-
Hi,
I am building the route like this: pub fn create_route() -> Router {
Router::new()
.route("/ws", get(launch_ws))
.route("/fake", get(fake))
.layer(CorsLayer::very_permissive())
} And hosting the server like this: let app = Router::new()
.merge(create_route())
.layer(
TraceLayer::new_for_http()
.make_span_with(DefaultMakeSpan::default().include_headers(true)),
);
// .layer(cors);
tokio::spawn(async move {
axum::serve(
listener,
app.into_make_service_with_connect_info::<SocketAddr>(),
)
.await
}); On the client I am just: const URL = `ws://localhost:45921/launch_comm`;
ws = new WebSocket(URL); Here is the log output. Note the output that is printed out one minute after the initial request
Can anyone help me with this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Can you try with |
Beta Was this translation helpful? Give feedback.
it seems related to js code.
you'd better put the whole demo to a repo. so people can help you