mirror of
https://github.com/ProudMuBai/GoFilm.git
synced 2026-02-28 15:54:41 +08:00
cache picuter to server
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"log"
|
||||
"net/http"
|
||||
"server/config"
|
||||
"server/controller"
|
||||
)
|
||||
|
||||
@@ -13,6 +14,9 @@ func SetupRouter() *gin.Engine {
|
||||
// 开启跨域
|
||||
r.Use(Cors())
|
||||
|
||||
// 静态资源配置
|
||||
r.Static("/static/image", config.ImageDir)
|
||||
|
||||
r.GET(`/index`, controller.Index)
|
||||
r.GET(`/navCategory`, controller.CategoriesInfo)
|
||||
r.GET(`/filmDetail`, controller.FilmDetail)
|
||||
|
||||
Reference in New Issue
Block a user