mindoc/main.go

34 lines
809 B
Go
Raw Normal View History

2017-04-19 18:19:27 +08:00
package main
import (
2017-05-09 18:17:08 +08:00
"fmt"
"os"
"github.com/astaxie/beego"
2017-05-03 15:05:01 +08:00
_ "github.com/astaxie/beego/session/memcache"
_ "github.com/astaxie/beego/session/mysql"
_ "github.com/astaxie/beego/session/redis"
_ "github.com/go-sql-driver/mysql"
2017-04-21 18:20:35 +08:00
"github.com/lifei6671/godoc/commands"
"github.com/lifei6671/godoc/conf"
2017-05-03 14:22:05 +08:00
"github.com/lifei6671/godoc/controllers"
_ "github.com/lifei6671/godoc/routers"
2017-04-19 18:19:27 +08:00
)
func main() {
2017-05-01 17:43:33 +08:00
2017-04-21 18:20:35 +08:00
commands.RegisterDataBase()
commands.RegisterModel()
commands.RegisterLogger()
commands.RegisterCommand()
commands.RegisterFunction()
beego.SetStaticPath("uploads", "uploads")
2017-05-01 19:12:52 +08:00
2017-05-03 14:22:05 +08:00
beego.ErrorController(&controllers.ErrorController{})
fmt.Printf("MinDoc version => %s\nbuild time => %s\nstart directory => %s\n%s\n", conf.VERSION, conf.BUILD_TIME, os.Args[0], conf.GO_VERSION)
2017-04-19 18:19:27 +08:00
beego.Run()
}