https://github.com/romshark/watchserve
An HTTP file server that's watching the served file for updates and automatically reloads the page
https://github.com/romshark/watchserve
Last synced: about 2 months ago
JSON representation
An HTTP file server that's watching the served file for updates and automatically reloads the page
- Host: GitHub
- URL: https://github.com/romshark/watchserve
- Owner: romshark
- License: bsd-3-clause
- Created: 2021-06-13T15:47:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-01T13:51:48.000Z (8 months ago)
- Last Synced: 2025-07-12T01:07:43.946Z (3 months ago)
- Language: Go
- Size: 28.3 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# watchserve
[watchserve](https://github.com/romshark/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](https://github.com/romshark/watchserve/releases).
Alternatively, you can use the Go toolchain to install watchserve.
### Through the Go toolchain
1. Download the latest version of [Go](https://go.dev/).
2. Run the following command:
```
go install github.com/romshark/watchserve@latest
```## How to use
```
watchserve -host localhost:8080 -f myfile.txt
```- `-help` prints help.
- `-f` specifies the file to watch.
- `-host` specifies the server address to listen on.
- `-debounce` specifies how much time needs to pass after the last change was detected before a reload is triggered.
- `-no-redirect` disables automatic redirect to the browser on start.