diff --git a/app/mix/cmd_offline/main.go b/app/mix/cmd_offline/main.go index 11a6ad56..876e5c79 100644 --- a/app/mix/cmd_offline/main.go +++ b/app/mix/cmd_offline/main.go @@ -107,14 +107,16 @@ func main() { // 初始化http server go exec.Run() + ip := GetIp() + port := cfg.App.Port router := httpengine.NewRouter() validator.InitDefaultNotNullValidator() controller.InitOffline(router) srv := &http.Server{ - Addr: fmt.Sprintf("%s:%d", GetIp(), cfg.App.Port), + Addr: fmt.Sprintf("%s:%d", ip, port), Handler: router, } - httpserver.StartHttpServer(srv, cfg.OfflineServer) + httpserver.StartHttpServer(srv, cfg.OfflineServer, ip, port) } func PrintAndExit(msg string) {