靜態檔案支援
beego 靜態檔案實現和設定
//static file server
for prefix, staticDir := range StaticDir {
if strings.HasPrefix(r.URL.Path, prefix) {
file := staticDir + r.URL.Path[len(prefix):]
http.ServeFile(w, r, file)
w.started = true
return
}
}beego.StaticDir["/asset"] = "/static"bootstrap 整合


links
Last updated
