| Crates.io | live-server |
| lib.rs | live-server |
| version | 0.10.1 |
| created_at | 2022-01-16 13:22:44.026637+00 |
| updated_at | 2025-06-15 12:31:00.952613+00 |
| description | Launch a local network server with live reload feature for static pages. |
| homepage | https://github.com/lomirus/live-server |
| repository | https://github.com/lomirus/live-server |
| max_upload_size | |
| id | 514839 |
| size | 103,768 |
Launch a local network server with live reload feature for static pages.
You can use it as a CLI program.
$ cargo install live-server
$ live-server -h
Launch a local network server with live reload feature for static pages
Usage: live-server [OPTIONS] [ROOT]
Arguments:
[ROOT] Set the root path of the static assets [default: .]
Options:
--index Show directory listings if there is no index.html
-H, --host <HOST> Set the listener host [default: 0.0.0.0]
-p, --port <PORT> Set the listener port [default: 0]
-o, --open [<PAGE>] Open the page in browser automatically
--hard Hard reload the page on update instead of hot reload
-I, --ignore Ignore hidden and ignored files
-h, --help Print help (see more with '--help')
-V, --version Print version
$ live-server
[2023-12-22T15:16:04Z INFO live_server::server] Listening on http://10.17.95.220:6634/
[2023-12-22T15:16:04Z INFO live_server::watcher] Listening on /home/mirus/html-demo
You can set different RUST_LOG environment variable to filter the log. The default log level is info.
You can also import it as a library in your project.
use live_server::{listen, Options};
listen("127.0.0.1:8080", "./").await?.start(Options::default()).await;
env_logger::init();