1
0
mirror of https://github.com/labstack/echo.git synced 2025-06-08 23:56:20 +02:00

27 lines
329 B
Go
Raw Normal View History

package main
import (
"net/http"
"github.com/labstack/echo"
mw "github.com/labstack/echo/middleware"
)
// Handler
func hello(c *echo.Context) {
c.String(http.StatusOK, "Hello, World!\n")
}
func main() {
e := echo.New()
// Middleware
e.Use(mw.Logger)
// Routes
e.Get("/", hello)
// Start server
e.Run(":4444")
}