123456789101112131415161718192021222324252627282930 |
- package route
- import (
- "ordonnance/apis/game"
- "ordonnance/apis/third"
- "ordonnance/common/corn"
- "ordonnance/common/middleware"
- "ordonnance/logger"
- "github.com/gin-gonic/gin"
- _ "github.com/go-sql-driver/mysql"
- )
- func RunService(myport string) {
- corn.RunCorn()
- r := gin.Default()
- r.Use(middleware.Recover)
- // base
- r.GET("/ordonnance/qrcode/:ordonnanceId", third.GetordonnanceQrcode)
- r.POST("/ordonnance/detail/:ordonnanceId", third.GetordonnanceDetail)
- r.POST("/account/login", game.Login)
- r.POST("/account/register", game.Register)
- r.POST("/account/serverList", game.ServerList)
- r.POST("/account/getGate", game.GetGate)
- r.POST("/qmbz/recordAction", game.RecordAction)
- //
- logger.Infof("strat http server @port=%s", myport)
- r.Run(":" + myport)
- }
|