1
0

refactor: prepare backend refactor

This commit is contained in:
2026-07-14 16:54:40 +08:00
parent 0f674d0483
commit 26dce7ce80
19 changed files with 183 additions and 15 deletions

22
backend/main.go Normal file
View File

@@ -0,0 +1,22 @@
// main.go
package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
func main() {
// 创建默认的 Gin 引擎(包含 Logger 和 Recovery 中间件)
r := gin.Default()
// 定义路由
r.GET("/", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "Hello, Gin!",
})
})
//启动服务器默认端口8088
r.Run(":8080")
}