example

package module
v0.0.0-...-eae59be Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 1 Imported by: 0

README

Bifrost Example

This is an example application demonstrating Bifrost's SSR capabilities.

Prerequisites

  • Go 1.21+
  • Bun
  • Air (go install github.com/cosmtrek/air@latest)

Development

Run the development server with hot reload:

make dev

Then open http://localhost:8080

Note: The .bifrost directory is created automatically for the embed directive to work.

Production Build

make build
./bifrost

Desktop Build (Linux)

Build a native desktop app using webview (no external browser needed):

Prerequisites
  • Go 1.21+
  • Bun
  • Linux: GTK 3 and WebKitGTK development libraries
Development (Hot Reload)
make dev-desktop
Production Build
make build-desktop
./bifrost-desktop

The desktop app uses static pages (no SSR runtime embedded), producing a minimal single binary.

Available Routes

  • / - Home page with SSR
  • /about - About page
  • /nested - Nested page example
  • /message/{message} - Dynamic route example
  • /error - Error handling demo

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BifrostFS embed.FS
View Source
var IconPNG []byte

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
full command

Jump to

Keyboard shortcuts

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