1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-27 21:48:57 +02:00
echo/examples/hello/server.go

26 lines
289 B
Go
Raw Normal View History

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