1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-22 20:06:21 +02:00
echo/recipe/graceful-shutdown/server.go
Vishal Rana b358b06311 updated docs, closes #735
Signed-off-by: Vishal Rana <vr@labstack.com>
2016-11-17 16:21:41 -08:00

21 lines
303 B
Go

package main
import (
"time"
"github.com/labstack/echo"
)
func main() {
e := echo.New()
// Setting up the termination timeout to 30 seconds.
e.ShutdownTimeout = 30 * time.Second
e.GET("/", func(ctx echo.Context) error {
return ctx.String(200, "OK")
})
e.Logger.Fatal(e.Start(":1323"))
}