watchserve
watchserve is an HTTP file server that's watching the served file for updates and automatically reloads the page in any modern JavaScript-capable browser.
Install
Download one of the packaged executables from the latest release version.
Alternatively, you can use the Go toolchain to install watchserve.
Through the Go toolchain
- Download the latest version of Go.
- Run the following command:
go install github.com/romshark/watchserve@latest
How to use
watchserve -host localhost:8080 -f myfile.txt
-helpprints help.-fspecifies the file to watch.-hostspecifies the server address to listen on.-debouncespecifies how much time needs to pass after the last change was detected before a reload is triggered.-no-redirectdisables automatic redirect to the browser on start.