Skip to content

Instantly share code, notes, and snippets.

// the "real" frontend gets embedded here
//go:embed frontend/build
var frontend embed.FS
func setupReverseProxyForTest(target string) *httputil.ReverseProxy {
testServer, err := url.Parse(target)
if err != nil {
log.Fatal().Str("backend_target", target).Err(err).Msg("could not parse target URL")