Watch A Content Directory And Do A Live Reload Of Pages In An Axum Web Server Embedded In Tauri When They Change
toml
Cargo.toml
[package]
name = "tauri_neopoligen_prototype"
version = "0.0.1"
description = "Tauri With Axum Embedded"
license = ""
repository = ""
edition = "2021"
[build-dependencies]
tauri-build = { version = "1.5", features = [] }
[dependencies]
tauri = { version = "1.5", features = ["shell-open"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
axum = "0.7.4"
tower-http = { version = "0.5.1", features = ["fs"] }
tower-livereload = "0.9.1"
tokio = { version = "1.35.1"}
# tokio = { version = "1.35.1", features = ["rt-multi-thread", "macros"] }
notify = "6.1.1"
notify-debouncer-mini = "0.4.1"
[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]
rust
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
use Router;
use ;
use Path;
use Duration;
use ServeDir;
use LiveReloadLayer;
async