by Robin at 20240523
This commit is contained in:
parent
c9fa28946f
commit
6907d7c8a2
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue