35 lines
637 B
Rust
35 lines
637 B
Rust
pub mod api;
|
|
pub mod app;
|
|
pub mod components;
|
|
pub mod models;
|
|
pub mod pages;
|
|
pub mod schema;
|
|
pub mod util;
|
|
|
|
#[cfg(feature = "server")]
|
|
pub mod server;
|
|
|
|
use crate::app::App;
|
|
|
|
fn tracing_setup() {
|
|
#[cfg(debug_assertions)]
|
|
dioxus::logger::init(tracing::Level::DEBUG).expect("Failed to initialize tracing logger");
|
|
}
|
|
|
|
#[cfg(not(feature = "server"))]
|
|
fn main() {
|
|
tracing_setup();
|
|
dioxus::launch(App);
|
|
}
|
|
|
|
#[cfg(feature = "server")]
|
|
fn main() -> std::process::ExitCode {
|
|
tracing_setup();
|
|
|
|
if let Err(e) = server::main() {
|
|
tracing::error!("Server main failed:\n{e}");
|
|
}
|
|
|
|
std::process::ExitCode::FAILURE
|
|
}
|