From 4105635a029f5b9266b2db3d13c53db5c43e2d93 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Tue, 18 Feb 2020 18:58:00 +0200 Subject: [PATCH] Fix a Host example: https://github.com/kataras/iris/issues/1451 --- Host.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Host.md b/Host.md index e966c0f..8d32694 100644 --- a/Host.md +++ b/Host.md @@ -136,7 +136,8 @@ There may be times that you want something very special to listen on, which is n // the responsibility of starting up a listener is up to you with this way, // for the sake of simplicity we will use the // ListenAndServe function of the `net/http` package. -app.Run(iris.Raw(&http.Server{Addr:":8080"}).ListenAndServe) +srv := &http.Server{Addr:":8080"} +app.Run(iris.Raw(srv.ListenAndServe)) ``` ## Host configurators