forked from mindoc-org/mindoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
34 lines (25 loc) · 811 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"fmt"
"os"
"github.com/astaxie/beego"
_ "github.com/astaxie/beego/session/memcache"
_ "github.com/astaxie/beego/session/mysql"
_ "github.com/astaxie/beego/session/redis"
_ "github.com/go-sql-driver/mysql"
"github.com/lifei6671/godoc/commands"
"github.com/lifei6671/godoc/conf"
"github.com/lifei6671/godoc/controllers"
_ "github.com/lifei6671/godoc/routers"
)
func main() {
commands.RegisterDataBase()
commands.RegisterModel()
commands.RegisterLogger()
commands.RegisterCommand()
commands.RegisterFunction()
beego.SetStaticPath("uploads", "uploads")
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)
beego.Run()
}