Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.go-mizu.dev/llms.txt

Use this file to discover all available pages before exploring further.

Learn Mizu through practical, runnable examples. Each example focuses on one concept and includes complete, working code. All examples are available at github.com/go-mizu/examples:
git clone https://github.com/go-mizu/examples
cd examples
go run ./001-hello-mizu

Getting Started

These examples cover the fundamentals of building web applications with Mizu:
  1. Hello, Mizu - Your first web server
  2. Static Files - Serve HTML, CSS, and JavaScript
  3. Routing Basics - Define routes and handlers
  4. JSON Responses - Return structured data
  5. Context and Lifecycle - Handle timeouts and cancellation
  6. Query, Form, and Path Parameters - Read request data
  7. Cookies - Store data between requests
  8. Middleware Basics - Add logging, auth, and shared logic
  9. Error Handling and Recover - Handle errors and panics
  10. Logging with slog - Structured request logging

What you will learn

By working through these examples, you will understand how to:
  • Create routes and handlers
  • Read data from requests (path, query, form, JSON)
  • Send responses (text, JSON, HTML, files)
  • Use middleware for cross-cutting concerns
  • Handle errors consistently
  • Log requests and application events
Start with Hello, Mizu and work through each example in order.