* Fix server crash logging and opening fullstack apps * Fix race condition during SSG * move route prerendering into a separate stage * Fix static site generation with dx serve * only proxy the fullstack server if ssg is disabled * test nested-suspense with ssg in playwright
28 lines
800 B
Rust
28 lines
800 B
Rust
#![allow(non_snake_case)]
|
|
use dioxus::prelude::*;
|
|
use nested_suspense::app;
|
|
|
|
fn main() {
|
|
dioxus::LaunchBuilder::new()
|
|
.with_cfg(server_only! {
|
|
ServeConfig::builder()
|
|
.incremental(
|
|
IncrementalRendererConfig::new()
|
|
.static_dir(
|
|
std::env::current_exe()
|
|
.unwrap()
|
|
.parent()
|
|
.unwrap()
|
|
.join("public")
|
|
)
|
|
)
|
|
.enable_out_of_order_streaming()
|
|
})
|
|
.launch(app);
|
|
}
|
|
|
|
#[server(endpoint = "static_routes")]
|
|
async fn static_routes() -> Result<Vec<String>, ServerFnError> {
|
|
Ok(vec!["/".to_string()])
|
|
}
|