Selaa lähdekoodia

自定义端口

luoyangwei 1 vuosi sitten
vanhempi
sitoutus
d93143c30d
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      websocket.go

+ 2 - 1
websocket.go

@@ -2,6 +2,7 @@ package main
 
 import (
 	"flag"
+	"fmt"
 	"net/http"
 	"time"
 
@@ -25,7 +26,7 @@ func main() {
 	zlog.WithZapLogger(zlog.NewLogger(config.MustLoadLogger()))
 
 	app := newApp()
-	app.Run()
+	app.Run(fmt.Sprintf(":%d", config.Config.Port))
 }
 
 func newApp() *gin.Engine {