web

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 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 127.0.0.1:port (or auto-picks from 8080 when port==0), prints the listen URL to stdout, 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