Go implementation of tapio/liveserver. A Simple development web server written in go with live reload capabilities
The server functions similarly to tapio/liveserver. It serves a directory and its subdirectories, and establishes a WebSocket connection by injecting a JavaScript snippet into every HTML file it serves. The server monitors changes in the directories it serves, and when changes occur, it sends a message via WebSocket to instruct the browser to reload the page.
You can run go-live-server with docker:
docker run -v $(pwd):/data -p 8080:8080 coolapso/go-live-server:latest
Now you can edit your html files and let go-live-server work its magic from within the docker container
go install github.com/coolapso/go-live-server
go install github.com/coolapso/[email protected]
On Arch linux you can use the AUR go-live-server-bin
It is also possible to install on any linux distro with the installation script
curl -L http://live-server.coolapso.sh/install.sh | bash
curl -L http://live-server.coolapso.sh/install.sh | VERSION="v1.1.0" bash
- Grab the binary from the releases page.
- Extract the binary
- Execute it
go-live-server is a simple development webserver with live reloading capabilityes.
It allows you to quickly edit and visualize changes when developing simple html and css files
Usage:
live-server [flags]
live-server [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
version Print live-server version
Flags:
--browser Enable or disable automatic opening of the browser (default true)
-h, --help help for live-server
--open-file string Specify the relative path to open the browser in the directory being served
-p, --port string The port server is going to listen on (default ":8080")
-d, --watch-dir string Sets the directory to watch for (default "./")
Use "live-server [command] --help" for more information about a command.
make build
go build -o go-live-server
Improvements and suggestions are always welcome, feel free to check for any open issues, open a new Issue or Pull Request
If you like this project and want to support / contribute in a different way you can always ❤️ Sponsor Me or
Also consider supporting tapio/live-server which inspired this project