2022-01-10 20:21:47 +08:00
|
|
|
package main
|
|
|
|
|
2022-01-12 01:44:10 +08:00
|
|
|
import (
|
|
|
|
"git.icechen.cn/monorepo/backend/app/zeus/api/lark/internal/user"
|
2022-01-13 14:28:50 +08:00
|
|
|
"git.icechen.cn/monorepo/backend/pkg/api"
|
2022-01-12 01:44:10 +08:00
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
ctxLogger "github.com/luizsuper/ctxLoggers"
|
|
|
|
)
|
2022-01-10 20:21:47 +08:00
|
|
|
|
|
|
|
func main() {
|
2022-01-12 01:44:10 +08:00
|
|
|
router := fiber.New(fiber.Config{
|
|
|
|
AppName: "api-lark",
|
2022-01-13 15:27:19 +08:00
|
|
|
ErrorHandler: api.FiberMiddleWareErrHandler,
|
2022-01-12 01:44:10 +08:00
|
|
|
})
|
2022-01-13 15:27:19 +08:00
|
|
|
router.Use(api.FibberMiddleWareRespHandler)
|
2022-01-12 01:44:10 +08:00
|
|
|
|
|
|
|
userRouter := router.Group("/user")
|
|
|
|
userRouter.Post("/login", user.LoginHandle)
|
|
|
|
|
|
|
|
err := router.Listen(":8080")
|
|
|
|
if err != nil {
|
|
|
|
ctxLogger.Error(nil, err.Error())
|
|
|
|
}
|
|
|
|
}
|