Static method on the router.You can serve files from a local directory or from Go’s embedded filesystem.
Serve files from a local directory
If you have apublic/ folder containing assets:
public/logo.png available at http://localhost:3000/assets/logo.png.
You do not have to include the trailing slash in the prefix — Mizu automatically adds it internally.
Serve embedded files
You can include static files directly in your Go binary using theembed package.
To serve files correctly, use fs.Sub to remove the folder prefix.
/assets/logo.png from the embedded file public/logo.png.
Mount external handlers
You can mount any standardhttp.Handler at a specific path.
This works well with http.FileServer or other middleware built for net/http.
Static method works the same way internally, using http.FileServer and http.StripPrefix to ensure correct path handling.