30 lines
565 B
Go
30 lines
565 B
Go
package main
|
|
|
|
import (
|
|
"yuleduiPay/controller"
|
|
"yuleduiPay/middle"
|
|
"yuleduiPay/service"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
|
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
s := g.Server()
|
|
s.Use(middle.MiddlewareCORS, middle.MiddlewareHandlerResponse)
|
|
payRouter := controller.Pay{}
|
|
s.Group("/wxApi", payRouter.RouterGroup)
|
|
yesPayRouter := controller.YsePay{}
|
|
s.Group("/ysePay", yesPayRouter.RouterGroup)
|
|
mqtt := service.MQTT{}
|
|
err := mqtt.InitMQTT()
|
|
if err != nil {
|
|
return
|
|
}
|
|
g.Log().Line().Print(nil, "初始化成功")
|
|
s.Run()
|
|
|
|
}
|