23 lines
496 B
Go
23 lines
496 B
Go
package main
|
|
|
|
import (
|
|
"twin-api/app/routers"
|
|
"twin-api/base/config"
|
|
"twin-api/base/global"
|
|
|
|
Ga "git.u8t.cn/open/go-admin"
|
|
Gs "git.u8t.cn/open/go-server"
|
|
)
|
|
|
|
func main() {
|
|
Gs.InitServer("conf/server.conf." + config.GetEnv())
|
|
global.Init()
|
|
Ga.SetGin(global.GetGin())
|
|
Ga.InitServer("conf/server.conf." + config.GetEnv())
|
|
routers.InitRouter(global.GetGin())
|
|
|
|
if err := global.GetGin().Run(global.GetConfig().Server.Address); err != nil {
|
|
panic(config.ErrInternal.New().Append(err))
|
|
}
|
|
}
|