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

Changed default port in examples

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-05-10 08:22:49 -07:00
parent c58ec742a9
commit 1b757d99d8
7 changed files with 11 additions and 11 deletions

View File

@ -99,7 +99,7 @@ func main() {
e.Get("/", hello)
// Start server
e.Run(":4444")
e.Run(":1323)
}
```

View File

@ -70,5 +70,5 @@ func main() {
e.Delete("/users/:id", deleteUser)
// Start server
e.Run(":4444")
e.Run(":1323")
}

View File

@ -23,5 +23,5 @@ func main() {
e.Get("/", hello)
// Start server
e.Run(":4444")
e.Run(":1323")
}

View File

@ -125,7 +125,7 @@ func main() {
})
// Start server
e.Run(":4444")
e.Run(":1323")
}
func init() {

View File

@ -298,10 +298,10 @@ func (r *router) Find(method, path string, ctx *Context) (h HandlerFunc, echo *E
cn = c
ctx.pvalues[n] = search
search = "" // End search
} else {
// Not found
return
continue
}
// Not found
return
}
}

View File

@ -252,7 +252,7 @@ func main() {
return &echo.HTTPError{Code: http.StatusUnauthorized}
})
e.Get("/welcome", welcome)
e.Run(":4444")
e.Run(":1323")
}
func welcome(c *echo.Context) *echo.HTTPError {

View File

@ -74,7 +74,7 @@ func main() {
e.Get("/", hello)
// Start server
e.Run(":4444")
e.Run(":1323")
}
```
@ -95,7 +95,7 @@ whenever server receives an HTTP request at `/`, hello handler is called.
In hello handler `c.String(http.StatusOK, "Hello, World!\n")` sends a text/plain
HTTP response to the client with 200 status code.
`e.Run(":4444")` Starts HTTP server at network address `:4444`.
`e.Run(":1323")` Starts HTTP server at network address `:1323`.
Now start the server using command
@ -103,7 +103,7 @@ Now start the server using command
$ go run server.go
```
Browse to [http://localhost:4444](http://localhost:4444) and you should see
Browse to [http://localhost:1323](http://localhost:1323) and you should see
Hello, World! on the page.
### Next?