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