server

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package server provides the browser document-server HTTP service.

Index

Constants

View Source
const (
	DefaultHost = "127.0.0.1"
	DefaultPort = 8793
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, options Options) error

Run validates, starts, and gracefully shuts down one document server.

Types

type Options

type Options struct {
	// Inputs lists one or more files or directories to serve. Each entry
	// keeps its own access boundary; they are never merged into one root.
	Inputs     []string
	Host       string
	Port       int
	Mode       markdown.Mode
	Width      markdown.Width
	Browser    bool
	CDN        bool
	TOC        bool
	Pattern    string
	Depth      int
	PatternSet bool
	DepthSet   bool
	TOCSet     bool
	Log        io.Writer
	UI         fs.FS
	Version    string

	OnListening func(string)
}

Options configures a document server.

Jump to

Keyboard shortcuts

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