Files
zeekay 795617c313 zip: the module is hanzo.ai/zip
The import path a reader types is the one the org owns, rather than the forge
that happens to host the bytes. hanzo.ai serves the go-import meta and points it
at the same repository, so where the code lives does not change.

The README's `go get` line moves with it — an install instruction naming the old
path is the one leftover a reader would actually follow.
2026-08-23 21:44:55 -07:00

27 lines
548 B
Go

// Hello, zip — minimal example.
//
// go run ./examples/hello
// curl http://localhost:8080/hello
package main
import (
"log"
"hanzo.ai/zip"
"hanzo.ai/zip/middleware"
)
func main() {
app := zip.New(zip.Config{AppName: "hello"})
app.Use(middleware.Recover(), middleware.RequestID())
app.Get("/hello", func(c *zip.Ctx) error {
return c.JSON(200, map[string]string{"message": "hello world"})
})
app.Get("/health", func(c *zip.Ctx) error {
return c.JSON(200, map[string]string{"status": "ok"})
})
log.Fatal(app.Listen(":8080"))
}