webui

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package webui provides the embedded Next.js static export. Without the embed_frontend build tag, no frontend is included and the Go server only handles API routes (dev mode uses a separate `next dev` process on :3000).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistFS

func DistFS() (fs.FS, error)

DistFS returns nil when the frontend is not embedded.

func IsEmbedded

func IsEmbedded() bool

IsEmbedded reports whether the frontend is compiled into this binary.

func NewSPAHandler

func NewSPAHandler() http.Handler

NewSPAHandler returns an http.Handler that serves the embedded frontend. It resolves Next.js static-export dynamic routes (e.g. [id] -> _) and falls back to index.html for client-side routing.

When the frontend is not embedded (no embed_frontend build tag), the returned handler responds with 404 so the caller can fall back to a non-SPA welcome page.

Types

This section is empty.

Jump to

Keyboard shortcuts

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