u
This commit is contained in:
1 parent
4ef00e1d5d
commit
9e00adf2fe
27 files changed
+1104
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"allapp-go-v2/internal/bootstrap"
|
||||
"fmt"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/gofiber/fiber/v3/middleware/requestid"
|
||||
)
|
||||
|
||||
func Start(appCtx *bootstrap.App) error {
|
||||
// 1️⃣ 创建 fiber 实例
|
||||
app := fiber.New()
|
||||
|
||||
app.Use(requestid.New())
|
||||
|
||||
// 2️⃣ 注册路由
|
||||
//registerRoutes(app, appCtx)
|
||||
|
||||
// 3️⃣ 启动服务
|
||||
addr := fmt.Sprintf(":%s", appCtx.Config.Server.Port)
|
||||
|
||||
fmt.Println("🚀 server running at", addr)
|
||||
|
||||
return app.Listen(addr)
|
||||
}
|
||||
Reference in new issue
Block a user