2017-04-19 18:19:27 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2017-05-09 18:17:08 +08:00
|
|
|
"fmt"
|
|
|
|
"os"
|
2017-05-11 13:39:34 +08:00
|
|
|
|
|
|
|
"github.com/astaxie/beego"
|
2017-05-03 15:05:01 +08:00
|
|
|
_ "github.com/astaxie/beego/session/memcache"
|
|
|
|
_ "github.com/astaxie/beego/session/mysql"
|
2017-05-11 13:39:34 +08:00
|
|
|
_ "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"
|
2017-05-11 13:39:34 +08:00
|
|
|
"github.com/lifei6671/godoc/conf"
|
2017-05-03 14:22:05 +08:00
|
|
|
"github.com/lifei6671/godoc/controllers"
|
2017-05-11 13:39:34 +08:00
|
|
|
_ "github.com/lifei6671/godoc/routers"
|
2017-05-20 09:52:18 +08:00
|
|
|
_ "github.com/mattn/go-sqlite3"
|
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()
|
|
|
|
|
2017-05-11 13:39:34 +08:00
|
|
|
beego.SetStaticPath("uploads", "uploads")
|
2017-05-01 19:12:52 +08:00
|
|
|
|
2017-05-03 14:22:05 +08:00
|
|
|
beego.ErrorController(&controllers.ErrorController{})
|
2017-05-10 13:43:36 +08:00
|
|
|
|
2017-05-11 13:39:34 +08:00
|
|
|
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()
|
|
|
|
}
|