Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package
v0.0.113 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package web serves the wrk React SPA (wrk-react) and mounts wrkserver.

Kept as a separate package so wrkcli can avoid importing wrkserver (which imports wrkcli), preventing an import cycle. cmd/wrk registers Serve via wrkcli.RegisterWebServe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(opts Options) error

Serve binds :port (or auto-picks from 8080 when port==0), prints http://127.0.0.1:<port>/, serves the React SPA (or Vite in Dev) and mounts wrkserver at /api/wrk. Blocks until SIGINT/SIGTERM or server error.

Types

type Options

type Options struct {
	WrkHome string
	Port    int
	// Dev proxies non-API traffic to the Vite server under wrk-react/.
	Dev bool
}

Options configures the local web UI server.

Jump to

Keyboard shortcuts

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