server

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package server implements "repolens serve": a net/http static server over the build output with fsnotify-driven rebuilds for local preview.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options, rebuild func(ctx context.Context) (dir string, err error)) error

Run blocks until ctx is canceled. rebuild must build the site into a fresh directory and return that directory. Successful directories are removed on exit.

Types

type Options

type Options struct {
	Addr     string
	Worktree bool
}

Options configures the local preview server.

Jump to

Keyboard shortcuts

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