pub async fn listen(
addr: impl AsRef<str>,
root: impl AsRef<Path>,
) -> Result<Listener<RecommendedWatcher>, String>Expand description
Create live-server listener using RecommendedWatcher.
use live_server::{listen, Options};
async fn serve() -> Result<(), Box<dyn std::error::Error>> {
listen("127.0.0.1:8080", "./").await?.start(Options::default()).await
}