HTTP shape
Method-aware routes on top of Go's ServeMux, middleware stacks, recovery, request logging, metrics, CORS, security headers, auth, and graceful shutdown.
Go HTTP server library
HyperServe began as the Go API server I wanted to own. It keeps ordinary net/http handlers and collects lifecycle, typed boundaries, security, observability, WebSocket, and optional MCP in one module. Its in-tree protocols mean fewer packages to assemble and more protocol code maintained here.
import (
"fmt"
"log"
"net/http"
server "github.com/osauer/hyperserve/pkg/server"
)
func main() {
srv, err := server.NewServer()
if err != nil {
log.Fatal(err)
}
srv.GET("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello, World!")
})
if err := srv.Run(); err != nil {
log.Fatal(err)
}
}
Method-aware routes on top of Go's ServeMux, middleware stacks, recovery, request logging, metrics, CORS, security headers, auth, and graceful shutdown.
Request binding and validation for JSON, query, and form input. JSONHandler wraps bind, validate, call, and respond without pulling in a larger framework.
WebSocket, SSE formatting, JSON-RPC, static file serving sandboxed with os.Root, and deferred initialization for services that need a fast health endpoint.
go get github.com/osauer/hyperserve@latest