Watch A Directory For File Changes While Hot Reloading Web Pages
This is the process I'm using for Neopoligin to rebuild and reload the site when source files change.
Code
use Router;
use RecursiveMode;
use Watcher;
use new_debouncer;
use fs;
use Path;
use PathBuf;
use Duration;
use ServeDir;
use LiveReloadLayer;
async
async
Installs
Code
cargo add axum
cargo add tokio --features "rt-multi-thread,macros"
cargo add tower-http --features "fs"
cargo add tower-livereload
cargo add notify
cargo add notify_debouncer_mini
-
Write up notes on how this works