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.

27 lines
725 B

3 years ago
package app
import (
"fmt"
"key_performance_indicators/initialization/initviper"
3 years ago
"key_performance_indicators/initialization/route"
"key_performance_indicators/overall"
)
type server interface {
ListenAndServe() error
}
// 启动服务
3 years ago
func RunItem() {
//加载基础配置
// var appConfig configApp.Server
initviper.RunViper(&overall.CONSTANT_CONFIG)
// fmt.Printf("CONSTANT_CONFIG----------->%v", overall.CONSTANT_CONFIG)
3 years ago
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))
}