k.zhang 4 سال پیش
والد
کامیت
f88efa3565
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 1 0
      root.txt
  2. 2 1
      routers/router.go

+ 1 - 0
root.txt

@@ -0,0 +1 @@
+f971310ebb8306db255227fef4e58eff

+ 2 - 1
routers/router.go

@@ -10,10 +10,11 @@ func InitRouter() {
 
 	r := gin.New()
 	r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "hello!") })
+	r.GET("/root.txt", func(c *gin.Context) { c.File("./root.txt") })
 	r2 := r.Group("/")
 	{
 		pdd.InitPddDdkRouter(r2)
 	}
-	_ = r.Run(":8080")
+	_ = r.Run(":80")
 
 }