router.go 273 B

12345678910111213141516171819
  1. package routers
  2. import (
  3. "duoduo/apis/pdd"
  4. "github.com/gin-gonic/gin"
  5. "net/http"
  6. )
  7. func InitRouter() {
  8. r := gin.New()
  9. r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "hello!") })
  10. r2 := r.Group("/")
  11. {
  12. pdd.InitPddDdkRouter(r2)
  13. }
  14. _ = r.Run(":8080")
  15. }