2024-12-08 17:00:22 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-12-15 15:10:44 +08:00
|
|
|
"github.com/infraboard/mcube/v2/ioc/server/cmd"
|
2024-12-08 17:00:22 +08:00
|
|
|
|
2024-12-15 15:10:44 +08:00
|
|
|
// 导入程序所有的对
|
|
|
|
_ "gitlab.com/go-course-project/go17/vblog/apps"
|
2025-01-19 18:16:29 +08:00
|
|
|
// web程序注入
|
|
|
|
_ "gitlab.com/go-course-project/go17/vblog/web"
|
2024-12-08 17:00:22 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2024-12-15 15:10:44 +08:00
|
|
|
// config.LoadConfig()
|
2024-12-08 17:00:22 +08:00
|
|
|
|
2024-12-15 15:10:44 +08:00
|
|
|
// // // http server ioc
|
|
|
|
// // // 服务器启动
|
|
|
|
// // if err := server.GinServer.Run(http.Get().Addr()); err != nil {
|
|
|
|
// // log.Println(err)
|
|
|
|
// // }
|
|
|
|
|
|
|
|
// config Load config and run
|
|
|
|
// if err := server.Run(context.Background()); err != nil {
|
|
|
|
// panic(err)
|
|
|
|
// }
|
|
|
|
|
2025-01-19 18:16:29 +08:00
|
|
|
// ioc 获取到 当前的 gin Engine
|
|
|
|
|
2024-12-15 15:10:44 +08:00
|
|
|
// load config and run with cobra cli
|
|
|
|
cmd.Start()
|
2024-12-08 17:00:22 +08:00
|
|
|
}
|