Use separate server main in main.rs
Some checks failed
Push Workflows / rustfmt (push) Successful in 5s
Push Workflows / tailwind-build (push) Successful in 5s
Push Workflows / test (push) Successful in 18s
Push Workflows / docs (push) Successful in 19s
Push Workflows / clippy (push) Successful in 15s
Push Workflows / build (push) Successful in 42s
Push Workflows / nix-build (push) Has been cancelled

This commit is contained in:
2026-06-21 16:39:41 -04:00
parent 3c58192957
commit a6b635fef0
2 changed files with 15 additions and 4 deletions

View File

@@ -38,12 +38,19 @@ fn Home() -> Element {
}
}
fn main() {
fn tracing_setup() {
#[cfg(debug_assertions)]
dioxus::logger::init(tracing::Level::DEBUG).expect("Failed to initialize tracing logger");
}
#[cfg(feature = "server")]
server::main();
#[cfg(not(feature = "server"))]
fn main() {
tracing_setup();
dioxus::launch(App);
}
#[cfg(feature = "server")]
fn main() {
tracing_setup();
server::main()
}