Quickstart
Echo is a high performance, minimalist Go web framework. This guide gets a server running in under five minutes.
Requirements
Section titled “Requirements”Echo requires Go 1.25 or newer. Check your version:
go versionInstall
Section titled “Install”Create a module and add Echo:
go mod init myappgo get github.com/labstack/echo/v5Hello, World
Section titled “Hello, World”Create main.go:
package main
import ( "net/http"
"github.com/labstack/echo/v5" "github.com/labstack/echo/v5/middleware")
func main() { e := echo.New()
e.Use(middleware.RequestLogger()) e.Use(middleware.Recover())
e.GET("/", func(c *echo.Context) error { return c.JSON(http.StatusOK, map[string]string{"message": "Hello, World!"}) })
if err := e.Start(":1323"); err != nil { e.Logger.Error("failed to start server", "error", err) }}Run it:
go run main.goYour server is live at http://localhost:1323. Echo’s router dispatches requests
with zero dynamic memory allocation per route.