livereload

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	URL = struct {
		WebSocket  string
		JavaScript string
	}{
		WebSocket:  "/livereload",
		JavaScript: "/livereload.js",
	}
)

---------------------------------------------------------------------- * WebSocket Server * ----------------------------------------------------------------------

Functions

func Alert

func Alert(message string)

Alert sends a notice message to browser's livereload.js.

func Middleware

func Middleware(next http.Handler) http.Handler

func Reload

func Reload()

Reload sends a reload message to browser's livereload.js.

func ServeJavaScript

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

ServeJavaScript serves livereload.js for browser.

func ServeWebSocket

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

Serve serves as a livereload server for accepting I/O tunnel messages.

func Start

func Start()

Start activates livereload server for accepting tunnel messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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