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:
parent
3fec523181
commit
059c5458e5
@ -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"))
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user