Prerequisites
- Go 1.22 or later installed (download)
- A terminal and text editor
Step 1: Create a project
Step 2: Install Mizu
Step 3: Create main.go
Create a file namedmain.go:
Step 4: Run it
Step 5: Test it
Open a new terminal and run:Ctrl+C in the first terminal to stop the server.
What just happened?
mizu.New()created an app with a router and default middlewareapp.Get("/", ...)registered a handler for GET requests to β/βc.JSON(200, ...)sent a JSON response with status 200app.Listen(":3000")started the HTTP server
Add more routes
Expand yourmain.go:
Project structure
For larger apps, organize code into packages:Whatβs next?
Core Concepts
Learn how Mizu components work together.
Build an API
Create a complete REST API tutorial.
Project Structure
Best practices for organizing your code.
Deployment
Deploy your app to production.