web

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package web provides the HTTP server for the unum JSON web UI. All static assets are embedded at build time — the binary is fully self-contained.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(root *node.Node, opts Options) error

Start launches the web server, auto-opens the browser, and blocks until the user presses Ctrl+C.

func StartServer added in v1.3.0

func StartServer(opts Options) error

StartServer launches the json web server with no pre-loaded file. GET /api/tree returns 204; the frontend shows a drop/paste zone. POST /api/upload accepts JSON content and returns a key for later retrieval.

Types

type Options

type Options struct {
	Port       int    // 0 = find a free port
	Filename   string // original filename for display
	Quiet      bool
	DarkTheme  string // cyber | matrix | dracula | nord
	LightTheme string // clean | solarized
	Version    string
	Tel        *telemetry.Telemetry
}

Options configures the web server.

Jump to

Keyboard shortcuts

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