Skip to content
Discussion options

You must be logged in to vote

This worked for me

    #[cfg(feature = "server")]
    {
        tokio::runtime::Builder::new_multi_thread()
            .enable_all()
            .build()
            .unwrap()
            .block_on(async {
                axum::serve(listener, app).await;
            });
    }

    #[cfg(not(feature = "server"))]
    {
        // Standard client-side launch
        dioxus::launch(App);
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oleid
Comment options

Answer selected by oleid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants