Download api/router.go from qwen2api/aurora: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/spaces/qwen2api/aurora/resolve/main/api/router.go
- Command line
-
hf download hf://spaces/qwen2api/aurora/api/router.go
-
curl -L -o router.go https://huggingface.co/spaces/qwen2api/aurora/resolve/main/api/router.go
317 Bytes
| package api | |
| import ( | |
| "aurora/internal/bootstrap" | |
| "github.com/gin-gonic/gin" | |
| "net/http" | |
| ) | |
| var router *gin.Engine | |
| func init() { | |
| // 初始化 gin | |
| app, err := bootstrap.Init() | |
| if err != nil { | |
| panic(err) | |
| } | |
| router = app.Router | |
| } | |
| func Listen(w http.ResponseWriter, r *http.Request) { | |
| router.ServeHTTP(w, r) | |
| } | |