Documentation
Quick Start
Build and run a minimal API in minutes.
Overview
Start with a small app, add middleware, and expose a health route.
Example
Go
app := elgon.New(elgon.Config{Addr: ":8080"})
app.Use(middleware.Recover())
app.GET("/health", func(c *elgon.Ctx) error {
return c.JSON(200, map[string]string{"status": "ok"})
})
log.Fatal(app.Run())Best Practices
- Start with explicit config values.
- Add recovery and request-id middleware first.
Common Pitfalls
- Ignoring graceful shutdown behavior.
- Skipping health endpoints during early setup.