Skip to content

About

Go library that adds live reloading capability to any http handler.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

Repository files navigation

go-livereload

go-livereload is a Go library that adds live reloading capability to any http handler.

Usage

Import:

package main

import "github.com/koonix/go-livereload"

Serve a directory:

upstream := http.FileServer(http.Dir("frontend"))
lr := livereload.New(upstream)
http.ListenAndServe(":8090", lr)

Proxy another webserver:

u, _ := url.Parse("http://localhost:8080")
upstream := livereload.ReverseProxy(u)
lr := livereload.New(upstream)
http.ListenAndServe(":8090", lr)

Reload the webpages open in browsers:

lr.Reload()

About

Go library that adds live reloading capability to any http handler.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages