Help us shape the future of Go! Take the 2026 Go Developer Survey

convention

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 5 Imported by: 0

README

Full convention app

This example exercises pages, loaders, dynamic params, every REST method, nested middleware, layouts, error fallbacks, not-found pages, public files, custom Vite config, streaming failure semantics, and server.go.

go run ./cmd/bifrost dev ./example/convention

Use BIFROST_ADDR because this example owns the server through server.go:

BIFROST_ADDR=127.0.0.1:9000 go run ./cmd/bifrost dev ./example/convention

Build and run:

go run ./cmd/bifrost build ./example/convention
BIFROST_ADDR=127.0.0.1:9000 ./example/convention/.bifrost/bifrost-app

Try every REST method:

for method in GET POST PUT PATCH DELETE HEAD OPTIONS; do
  curl -i -X "$method" http://localhost:8080/posts/api/hello
done

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(next http.Handler) http.Handler

func Serve

func Serve(ctx context.Context, handler http.Handler) error

Types

type ContextKey

type ContextKey string
const MiddlewareOrder ContextKey = "middleware-order"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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