Expand description
Launch a local network server with live reload feature for static pages.
§Create live server
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
}§Enable logs (Optional)
env_logger::init();Structs§
Functions§
- listen
- Create live-server listener using RecommendedWatcher.
- listen_
poll - Create live-server listener using PollWatcher.