A Go package implementing a LiveReload server that enables browser reloads and alerts via WebSocket communication.
lrserver is a Go package that implements a LiveReload server following the official LiveReload protocol. It enables developers to automatically reload web pages in the browser when files change during development, eliminating the need for manual refreshes. The package provides WebSocket communication and serves the necessary client JavaScript while leaving file watching implementation to the developer's application.
Go developers building web applications who want to implement live-reloading functionality during development without relying on external tools or complex setups.
Developers choose lrserver because it provides a minimal, protocol-compliant implementation that integrates directly into Go applications, offers full control over file watching logic, and supports multiple servers and connections with a simple API.
LiveReload server for Go [golang]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements the official LiveReload protocol, ensuring compatibility with standard clients and tools, as emphasized in the README's focus on protocol adherence.
Provides easy-to-use methods like Reload() and Alert() to trigger browser actions from Go code, demonstrated in the basic usage example.
Allows instantiation of multiple servers, each capable of handling multiple connections, useful for complex or modular development setups.
Automatically serves the LiveReload client JavaScript from the standard endpoint (/livereload.js), simplifying client-side integration without manual script hosting.
The README explicitly states that file watching must be implemented by the developer, requiring additional dependencies and code for basic functionality.
Only supports reload and alert commands; lacks advanced features like CSS injection or asset preprocessing, which may necessitate extra tooling for modern workflows.
Requires developers to handle WebSocket server lifecycle, file watcher integration, and error management, increasing initial configuration overhead compared to all-in-one solutions.