You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/02/06 05:59:17 UTC

[GitHub] asifdxtreme closed pull request #276: SCB-329 Set the default listening port in frontend

asifdxtreme closed pull request #276: SCB-329 Set the default listening port in frontend
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/276
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/frontend/main.go b/frontend/main.go
index 56432c01..fca9e1cd 100644
--- a/frontend/main.go
+++ b/frontend/main.go
@@ -27,12 +27,8 @@ import (
 )
 
 func main() {
-
 	frontendIp := beego.AppConfig.String("FRONTEND_HOST_IP")
-	frontendPort, err := beego.AppConfig.Int("FRONTEND_HOST_PORT")
-	if err != nil {
-		fmt.Println("error while reading port config value", err)
-	}
+	frontendPort := beego.AppConfig.DefaultInt("FRONTEND_HOST_PORT", 30103)
 
 	// command line flags
 	port := flag.Int("port", frontendPort, "port to serve on")
@@ -52,6 +48,5 @@ func main() {
 
 	addr := fmt.Sprintf("%s:%d", frontendIp, *port)
 	// this call blocks -- the progam runs here forever
-	err = http.ListenAndServe(addr, nil)
-	fmt.Println(err.Error())
+	fmt.Println(http.ListenAndServe(addr, nil))
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services