web

package
v0.0.0-...-b09cb34 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: AGPL-3.0, AGPL-3.0-only Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CacheControlImmutableAssets = "public, max-age=31536000, immutable" // 1 year
	CacheControlRootAssets      = "public, max-age=86400"               // 1 day
	CacheControlDocuments       = "no-cache, must-revalidate"
)

Variables

This section is empty.

Functions

func CreateApp

func CreateApp(maxBodyMB int, logger *zap.Logger, useColor bool) *fiber.App

func SetupStaticFileServing

func SetupStaticFileServing(app *fiber.App, devMode bool, vitePort int, webFS fs.FS) error

SetupStaticFileServing configures the Fiber app to serve static files. In dev mode, it proxies all requests to the Vite dev server (with an optional fallback to ./public). In production, it serves embedded static assets from the provided fs.FS, with support for user-provided assets in ./public that take precedence over embedded ones.

webFS should be an fs.FS containing the embedded frontend assets (if in prod mode)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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