mirror of
				https://github.com/labstack/echo.git
				synced 2025-10-30 23:57:38 +02:00 
			
		
		
		
	Changed default port in examples
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
		| @@ -99,7 +99,7 @@ func main() { | ||||
| 	e.Get("/", hello) | ||||
|  | ||||
| 	// Start server | ||||
| 	e.Run(":4444") | ||||
| 	e.Run(":1323) | ||||
| } | ||||
| ``` | ||||
|  | ||||
|   | ||||
| @@ -70,5 +70,5 @@ func main() { | ||||
| 	e.Delete("/users/:id", deleteUser) | ||||
|  | ||||
| 	// Start server | ||||
| 	e.Run(":4444") | ||||
| 	e.Run(":1323") | ||||
| } | ||||
|   | ||||
| @@ -23,5 +23,5 @@ func main() { | ||||
| 	e.Get("/", hello) | ||||
|  | ||||
| 	// Start server | ||||
| 	e.Run(":4444") | ||||
| 	e.Run(":1323") | ||||
| } | ||||
|   | ||||
| @@ -125,7 +125,7 @@ func main() { | ||||
| 	}) | ||||
|  | ||||
| 	// Start server | ||||
| 	e.Run(":4444") | ||||
| 	e.Run(":1323") | ||||
| } | ||||
|  | ||||
| func init() { | ||||
|   | ||||
| @@ -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 | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
| @@ -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? | ||||
|   | ||||
		Reference in New Issue
	
	Block a user