feat: document and re-export dioxus-cli-config (#3515)

* feat: document and re-export dioxus-cli-config
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-01-07 15:39:14 -08:00
1 parent d75cb59491
commit bb3fd38231
7 files changed
+176 -29

No files matched your search

+6 -6
View File
@@ -16,7 +16,7 @@
//! .block_on(async move {
//! // Get the address the server should run on. If the CLI is running, the CLI proxies fullstack into the main address
//! // and we use the generated address the CLI gives us
//! let address = dioxus_cli_config::fullstack_address_or_localhost();
//! let address = dioxus::cli_config::fullstack_address_or_localhost();
//! let listener = tokio::net::TcpListener::bind(address)
//! .await
//! .unwrap();
@@ -85,7 +85,7 @@ pub trait DioxusRouterExt<S> {
/// # use dioxus_fullstack::prelude::*;
/// #[tokio::main]
/// async fn main() {
/// let addr = dioxus_cli_config::fullstack_address_or_localhost();
/// let addr = dioxus::cli_config::fullstack_address_or_localhost();
/// let router = axum::Router::new()
/// // Register server functions routes with the default handler
/// .register_server_functions()
@@ -110,7 +110,7 @@ pub trait DioxusRouterExt<S> {
/// # use std::sync::Arc;
/// #[tokio::main]
/// async fn main() {
/// let addr = dioxus_cli_config::fullstack_address_or_localhost();
/// let addr = dioxus::cli_config::fullstack_address_or_localhost();
/// let router = axum::Router::new()
/// // Register server functions routes with the default handler
/// .register_server_functions_with_context(Arc::new(vec![Box::new(|| Box::new(1234567890u32))]))
@@ -130,7 +130,7 @@ pub trait DioxusRouterExt<S> {
/// # use dioxus_fullstack::prelude::*;
/// #[tokio::main]
/// async fn main() {
/// let addr = dioxus_cli_config::fullstack_address_or_localhost();
/// let addr = dioxus::cli_config::fullstack_address_or_localhost();
/// let router = axum::Router::new()
/// // Server side render the application, serve static assets, and register server functions
/// .serve_static_assets()
@@ -155,7 +155,7 @@ pub trait DioxusRouterExt<S> {
/// # use dioxus_fullstack::prelude::*;
/// #[tokio::main]
/// async fn main() {
/// let addr = dioxus_cli_config::fullstack_address_or_localhost();
/// let addr = dioxus::cli_config::fullstack_address_or_localhost();
/// let router = axum::Router::new()
/// // Server side render the application, serve static assets, and register server functions
/// .serve_dioxus_application(ServeConfig::new().unwrap(), app)
@@ -361,7 +361,7 @@ impl RenderHandleState {
///
/// #[tokio::main]
/// async fn main() {
/// let addr = dioxus_cli_config::fullstack_address_or_localhost();
/// let addr = dioxus::cli_config::fullstack_address_or_localhost();
/// let router = axum::Router::new()
/// // Register server functions, etc.
/// // Note you can use `register_server_functions_with_context`