You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
427 B
Go
22 lines
427 B
Go
|
5 months ago
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
_ "goftp/db"
|
||
|
|
_ "goftp/routers"
|
||
|
|
|
||
|
|
"github.com/astaxie/beego"
|
||
|
|
)
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
initStatic()
|
||
|
|
beego.Run()
|
||
|
|
}
|
||
|
|
|
||
|
|
func initStatic() {
|
||
|
|
beego.BConfig.WebConfig.StaticDir["/static"] = "static"
|
||
|
|
beego.BConfig.WebConfig.StaticDir["/goftp/static/pic"] = "static/pic"
|
||
|
|
goftpdir := beego.AppConfig.String("goftpdir")
|
||
|
|
beego.SetStaticPath("/goftp/goftpdir", goftpdir)
|
||
|
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||
|
|
}
|