diff --git a/cmd/api/server.go b/cmd/api/server.go index 93b938a..6dc6a19 100644 --- a/cmd/api/server.go +++ b/cmd/api/server.go @@ -10,7 +10,6 @@ import ( "ferry/tools" config2 "ferry/tools/config" "fmt" - "io/ioutil" "log" "net/http" "os" @@ -100,10 +99,14 @@ func run() error { } } }() - content, _ := ioutil.ReadFile("./static/ferry.txt") - fmt.Println(string(content)) - fmt.Printf("%s Server Run http://127.0.0.1:%s/ \r\n", tools.GetCurrntTimeStr(), config2.ApplicationConfig.Port) - fmt.Printf("%s Swagger URL http://127.0.0.1:%s/swagger/index.html \r\n", tools.GetCurrntTimeStr(), config2.ApplicationConfig.Port) + fmt.Printf("%s Server Run http://%s:%s/ \r\n", + tools.GetCurrntTimeStr(), + config2.ApplicationConfig.Host, + config2.ApplicationConfig.Port) + fmt.Printf("%s Swagger URL http://%s:%s/swagger/index.html \r\n", + tools.GetCurrntTimeStr(), + config2.ApplicationConfig.Host, + config2.ApplicationConfig.Port) fmt.Printf("%s Enter Control + C Shutdown Server \r\n", tools.GetCurrntTimeStr()) // 等待中断信号以优雅地关闭服务器(设置 5 秒的超时时间) quit := make(chan os.Signal)