1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Correct hello world example

The hello world example won't really run the server, shouldn't it be like this? Also the instruction below don't mention the /hello route so I removed it to simplify.
This commit is contained in:
Andreas Bergström 2016-04-05 20:41:06 +07:00
parent 3fec523181
commit 059c5458e5

View File

@ -53,15 +53,16 @@ package main
import (
"net/http"
"github.com/labstack/echo"
"github.com/labstack/echo/engine/standard"
)
func main() {
e := echo.New()
e.Get("/hello", func(c echo.Context) error {
e.Get("/", func(c echo.Context) error {
return c.String(http.StatusOK, "Hello, World!")
})
e.Run(standard.New(":1323"))
}
```