Files
dioxus/examples/01-app-demos/hotdog/src/main.rs
T
Jonathan Kelley 20e242628d fix stutter in bundle, fix nsis, fix msi bundling (#5412)
* fix stutter in bundle, fix nsis, fix msi bundling

* fmt

* rename android libname to `libmain`, rename server exe to `server`

* fix hot-dog url handling

* set linux product name

* update schema
2026-03-26 13:05:11 -07:00

31 lines
596 B
Rust

mod backend;
mod frontend;
use dioxus::prelude::*;
use frontend::*;
#[derive(Routable, PartialEq, Clone)]
enum Route {
#[layout(NavBar)]
#[route("/")]
DogView,
#[route("/favorites")]
Favorites,
}
fn main() {
// only in production should we set the URL, otherwise let `dx` do the work
#[cfg(all(not(feature = "server"), feature = "production"))]
dioxus::fullstack::set_server_url("https://hot-dog.fly.dev");
dioxus::launch(app);
}
fn app() -> Element {
rsx! {
Stylesheet { href: asset!("/assets/main.css") }
Router::<Route> {}
}
}