Letβs start with your first Mizu app. You will build a small web server that shows Hello, Mizu in your browser. It is a simple way to see how Mizu works while keeping everything clear and easy to follow. Mizu uses Goβs standard library under the hood, so if you have seenDocumentation 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.
net/http before, this will look familiar.
Code
Create a file calledmain.go and add this code:
mizu.New()creates your web app.app.Get("/", home)connects the URL/to yourhomehandler.home()sends a plain text message with status code200 OK.app.Listen(":8080")runs the server and waits for requests.
Run
Open your terminal and run:How it works
When you visit/, Mizu matches that route and calls the home function.
Inside home, the line c.Text(http.StatusOK, "Hello, Mizu") sends a text response back to the browser with a 200 OK status.
This is the basic flow in every Mizu app: receive a request, handle it with a function, and send a response using the context c.