24 lines
421 B
Go
24 lines
421 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"gateway/config"
|
|
"gateway/core"
|
|
"gateway/initialization"
|
|
"gateway/middleware"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func main() {
|
|
// 初始化系统
|
|
initialization.InitSystem()
|
|
// 创建默认Web服务
|
|
app := gin.Default()
|
|
|
|
app.Use(middleware.GenRequestId(), middleware.OpenTracing())
|
|
|
|
app.Any("/*action", core.NacosClient.Remote)
|
|
|
|
_ = app.Run(fmt.Sprintf(":%v", config.AppInfo.Port))
|
|
}
|