{"action":"created","issue":{"url":"https://api.github.com/repos/kataras/iris/issues/30","repository_url":"https://api.github.com/repos/kataras/iris","labels_url":"https://api.github.com/repos/kataras/iris/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/kataras/iris/issues/30/comments","events_url":"https://api.github.com/repos/kataras/iris/issues/30/events","html_url":"https://github.com/kataras/iris/issues/30","id":142901880,"number":30,"title":"Listenning to the different port?","user":{"login":"xpbliss","id":4346297,"avatar_url":"https://avatars.githubusercontent.com/u/4346297?v=3","gravatar_id":"","url":"https://api.github.com/users/xpbliss","html_url":"https://github.com/xpbliss","followers_url":"https://api.github.com/users/xpbliss/followers","following_url":"https://api.github.com/users/xpbliss/following{/other_user}","gists_url":"https://api.github.com/users/xpbliss/gists{/gist_id}","starred_url":"https://api.github.com/users/xpbliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xpbliss/subscriptions","organizations_url":"https://api.github.com/users/xpbliss/orgs","repos_url":"https://api.github.com/users/xpbliss/repos","events_url":"https://api.github.com/users/xpbliss/events{/privacy}","received_events_url":"https://api.github.com/users/xpbliss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-23T08:59:54Z","updated_at":"2016-03-23T09:02:56Z","closed_at":null,"body":"I want to listen to the different port ,such as 80 and 8080, but the following  is not listenning to the port 80.\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"github.com/kataras/iris\"\r\n)\r\n\r\nfunc main() {\r\n\t//log everything middleware\r\n\r\n\tiris.UseFunc(func(c *iris.Context) {\r\n\t\tprintln(\"[Global log] the requested url path is: \", c.Request.URL.Path)\r\n\t\tc.Next()\r\n\t})\r\n\r\n\t// Let's party\r\n\r\n\tadmin := iris.Party(\"/admin\")\r\n\t{\r\n\t\t// add a silly middleware\r\n\t\tadmin.UseFunc(func(c *iris.Context) {\r\n\t\t\t//your authentication logic here...\r\n\t\t\tprintln(\"from \", c.Request.URL.Path)\r\n\t\t\tauthorized := true\r\n\t\t\tif authorized {\r\n\t\t\t\tc.Next()\r\n\t\t\t} else {\r\n\t\t\t\tc.SendStatus(401, c.Request.URL.Path+\" is not authorized for you\")\r\n\t\t\t}\r\n\r\n\t\t})\r\n\t\tadmin.Get(\"/\", func(c *iris.Context) {\r\n\t\t\tc.Write(\"from /admin/ or /admin if you pathcorrection on\")\r\n\t\t})\r\n\t}\r\n\r\n\tbeta1 := iris.New()\r\n\tbeta1.Get(\"/hey\", func(c *iris.Context) { c.Write(\"hey from /admin/beta/hey\") })\r\n\tprintln(\"Iris is listening on :8080\")\r\n\tbeta1.Listen(\":80\")      /////////  It do nothing?\r\n\tiris.Listen(\":8080\")\r\n}\r\n```\r\nHow to do it ?"},"comment":{"url":"https://api.github.com/repos/kataras/iris/issues/comments/200259219","html_url":"https://github.com/kataras/iris/issues/30#issuecomment-200259219","issue_url":"https://api.github.com/repos/kataras/iris/issues/30","id":200259219,"user":{"login":"xpbliss","id":4346297,"avatar_url":"https://avatars.githubusercontent.com/u/4346297?v=3","gravatar_id":"","url":"https://api.github.com/users/xpbliss","html_url":"https://github.com/xpbliss","followers_url":"https://api.github.com/users/xpbliss/followers","following_url":"https://api.github.com/users/xpbliss/following{/other_user}","gists_url":"https://api.github.com/users/xpbliss/gists{/gist_id}","starred_url":"https://api.github.com/users/xpbliss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xpbliss/subscriptions","organizations_url":"https://api.github.com/users/xpbliss/orgs","repos_url":"https://api.github.com/users/xpbliss/repos","events_url":"https://api.github.com/users/xpbliss/events{/privacy}","received_events_url":"https://api.github.com/users/xpbliss/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T09:02:56Z","updated_at":"2016-03-23T09:02:56Z","body":"Another question:\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"github.com/kataras/iris\"\r\n)\r\n\r\nfunc main() {\r\n\t//log everything middleware\r\n\r\n\tiris.UseFunc(func(c *iris.Context) {\r\n\t\tprintln(\"[Global log] the requested url path is: \", c.Request.URL.Path)\r\n\t\tc.Next()\r\n\t})\r\n\r\n\t// Let's party\r\n\r\n\tadmin := iris.Party(\"/admin\")\r\n\t{\r\n\t\t// add a silly middleware\r\n\t\tadmin.UseFunc(func(c *iris.Context) {\r\n\t\t\t//your authentication logic here...\r\n\t\t\tprintln(\"from \", c.Request.URL.Path)\r\n\t\t\tauthorized := true\r\n\t\t\tif authorized {\r\n\t\t\t\tc.Next()\r\n\t\t\t} else {\r\n\t\t\t\tc.SendStatus(401, c.Request.URL.Path+\" is not authorized for you\")\r\n\t\t\t}\r\n\r\n\t\t})\r\n\t\tadmin.Get(\"/\", func(c *iris.Context) {\r\n\t\t\tc.Write(\"from /admin/ or /admin if you pathcorrection on\")\r\n\t\t})\r\n\t}\r\n\r\n\tiris.Listen(\":8080\")\r\n\r\n}\r\n\r\n```\r\nwhen in  http://locahost:8080/admin, the ``` iris.UseFunc()``` execute twice, the output is the following:\r\n ``` \r\nIris is listening on :8080\r\n[Global log] the requested url path is:  /admin/\r\n[Global log] the requested url path is:  /admin/\r\n ```"}}