admin

package
v1.37.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package admin embeds the static commerce admin SPA into the commerce binary.

The SPA is built from /Users/z/work/hanzo/commerce/app/admin via Next.js `output: 'export'` (static bundle in /app/admin/out). The build is copied into /admin/dist by the Dockerfile, then go:embed'd here and served at /admin/* by commerce.go's router.

Index

Constants

This section is empty.

Variables

View Source
var Static embed.FS

Static is the embedded admin bundle. The actual files come from /admin/dist which the Dockerfile populates from the Next.js export.

Functions

func Handler

func Handler(prefix string) http.Handler

Handler returns an http.Handler that serves the SPA at the given prefix (typically "/admin"). Falls back to index.html for client-side routing.

func Sub

func Sub() fs.FS

Sub returns the dist/ subdirectory as an fs.FS, ready to wrap with http.FS for serving.

Types

This section is empty.

Jump to

Keyboard shortcuts

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