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")
 
 }