KPI绩效考核系统
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.

26 lines
710 B

package app
import (
"fmt"
"key_performance_indicators/initialization/initviper"
"key_performance_indicators/initialization/route"
"key_performance_indicators/overall"
)
type server interface {
ListenAndServe() error
}
// 启动服务
func RunItem() {
//加载基础配置
// var appConfig configApp.Server
initviper.RunViper(&overall.CONSTANT_CONFIG)
// fmt.Printf("----------->%v", overall.CONSTANT_CONFIG)
routers := route.InitialRouter()
portStr := fmt.Sprintf(":%d", overall.CONSTANT_CONFIG.Appsetup.Port)
startUp := InitServer(portStr, routers)
fmt.Printf("\n\n默认API运行地址:http://127.0.0.1%s\n", portStr)
runErr := startUp.ListenAndServe().Error()
panic(fmt.Errorf(runErr))
}