livereload

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 3 Imported by: 1

README

livereload

Package livereload provides some JavaScript and corresponding http.Handler to enable full page reloads when the http.Server restarts.

demo

Pairing with gow is probably the easiest way to use this. Look at the demo code and run it like such:

gow run ./demo

Then make a change to the HTML demo in the index function and see your browser automatically reload the page.

Documentation

Overview

Package livereload provides some JavaScript and corresponding http.Handler to enable full page reloads when the http.Server restarts.

Index

Constants

View Source
const JS = `` /* 627-byte string literal not displayed */

JS should included on the webpages that need livereload. Including it will automatically setup the necessary functionality. Make sure to setup the corresponding Handler.

Variables

This section is empty.

Functions

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

Handler should be mounted to the path "/livereload". It will be used by the corresponding JS.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL