diff --git a/examples/clock.rs b/examples/clock.rs
index 4b7be3d3b..ba47d994a 100644
--- a/examples/clock.rs
+++ b/examples/clock.rs
@@ -1,8 +1,7 @@
use dioxus::prelude::*;
use dioxus_signals::use_signal;
-#[tokio::main]
-async fn main() {
+fn main() {
dioxus_desktop::launch(app);
}
diff --git a/packages/desktop/src/index.html b/packages/desktop/src/index.html
index 0704fd0f0..45926e3f1 100644
--- a/packages/desktop/src/index.html
+++ b/packages/desktop/src/index.html
@@ -1,12 +1,12 @@
-
- Dioxus app
-
-
-
-
-
-
-
+
+ Dioxus app
+
+
+
+
+
+
+
diff --git a/packages/desktop/src/protocol.rs b/packages/desktop/src/protocol.rs
index bdcefa473..be3c12231 100644
--- a/packages/desktop/src/protocol.rs
+++ b/packages/desktop/src/protocol.rs
@@ -5,10 +5,11 @@ use std::{
};
use wry::{
http::{status::StatusCode, Request, Response},
- Result,
+ RequestAsyncResponder, Result,
};
static MINIFIED: &str = include_str!("./minified.js");
+static DEFAULT_INDEX: &str = include_str!("./index.html");
pub(super) async fn desktop_handler(
request: Request>,
@@ -18,120 +19,110 @@ pub(super) async fn desktop_handler(
asset_handlers: &AssetHandlerRegistry,
edit_queue: &EditQueue,
headless: bool,
- responder: wry::RequestAsyncResponder,
+ responder: RequestAsyncResponder,
) {
let request = AssetRequest::from(request);
// If the request is for the root, we'll serve the index.html file.
if request.uri().path() == "/" {
- // If a custom index is provided, just defer to that, expecting the user to know what they're doing.
- // we'll look for the closing