aurora / api /router.go
qwen2api's picture
Upload 113 files
6bc074c verified
Raw
History Blame Contribute Delete
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)
}