新的应用平台采用国密SM4算法进行加解密
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
541 B

package initialization
import (
"appNewPlatform/appConstant"
"appNewPlatform/config/app"
"fmt"
)
// 启动服务
func RunItem() {
//加载基础配置
RunViper(&appConstant.Constant_Config, appConstant.AppConfigPath)
routers := InitializeRouter()
portStr := fmt.Sprintf(":%d", appConstant.Constant_Config.Appsetup.Port)
startUp := app.InitServer(portStr, routers)
fmt.Printf("\n\n默认API运行地址:http://127.0.0.1%s\n", portStr)
err := startUp.ListenAndServe().Error()
fmt.Printf("\n\n%s\n", err)
panic(fmt.Errorf(err))
}