1234567891011121314151617181920212223 |
- package route
- import (
- "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)
- //
- logger.Infof("strat http server @port=%s", myport)
- r.Run(":" + myport)
- }
|