Getting Started
These examples cover the fundamentals of building web applications with Mizu:- Hello, Mizu - Your first web server
- Static Files - Serve HTML, CSS, and JavaScript
- Routing Basics - Define routes and handlers
- JSON Responses - Return structured data
- Context and Lifecycle - Handle timeouts and cancellation
- Query, Form, and Path Parameters - Read request data
- Cookies - Store data between requests
- Middleware Basics - Add logging, auth, and shared logic
- Error Handling and Recover - Handle errors and panics
- 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