Move server-specific main to server module
Some checks failed
Push Workflows / build (push) Failing after 4s
Push Workflows / rustfmt (push) Successful in 6s
Push Workflows / test (push) Failing after 39s
Push Workflows / clippy (push) Failing after 36s
Push Workflows / docs (push) Failing after 43s
Push Workflows / nix-build (push) Failing after 2m6s
Some checks failed
Push Workflows / build (push) Failing after 4s
Push Workflows / rustfmt (push) Successful in 6s
Push Workflows / test (push) Failing after 39s
Push Workflows / clippy (push) Failing after 36s
Push Workflows / docs (push) Failing after 43s
Push Workflows / nix-build (push) Failing after 2m6s
This commit is contained in:
@@ -42,9 +42,7 @@ fn main() {
|
|||||||
dioxus::logger::init(tracing::Level::DEBUG).expect("Failed to initialize tracing logger");
|
dioxus::logger::init(tracing::Level::DEBUG).expect("Failed to initialize tracing logger");
|
||||||
|
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
if let Err(e) = dotenvy::dotenv() {
|
server::main();
|
||||||
tracing::warn!("Error reading .env: {e}");
|
|
||||||
}
|
|
||||||
|
|
||||||
dioxus::launch(App);
|
dioxus::launch(App);
|
||||||
}
|
}
|
||||||
|
|||||||
6
src/server/main.rs
Normal file
6
src/server/main.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
pub fn main() {
|
||||||
|
#[cfg(feature = "server")]
|
||||||
|
if let Err(e) = dotenvy::dotenv() {
|
||||||
|
tracing::warn!("Error reading .env: {e}");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1 +1,3 @@
|
|||||||
|
pub mod main;
|
||||||
|
|
||||||
|
pub use main::main;
|
||||||
|
|||||||
Reference in New Issue
Block a user