devserver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package devserver runs a local HTTP preview of the digest HTML templates with browser live-reload. It renders the digest/swipe/archive views from a fixed digest, re-reading templates from disk on every request, and pushes a reload to connected browsers whenever a *.tmpl file under the templates directory changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options) error

Run starts the preview server and blocks until the process is interrupted or the HTTP server fails.

Types

type Options

type Options struct {
	Addr         string          // listen address, e.g. ":8099"
	TemplatesDir string          // directory holding *.tmpl files, watched for changes
	OpenBrowser  bool            // open the default browser at startup
	Digests      []models.Digest // digests listed in the archive and served individually
}

Options configures the dev preview server.

Jump to

Keyboard shortcuts

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