main.go 811 B

12345678910111213141516171819202122232425262728293031323334
  1. package main
  2. import (
  3. "fmt"
  4. "os"
  5. "github.com/astaxie/beego"
  6. _ "github.com/astaxie/beego/session/memcache"
  7. _ "github.com/astaxie/beego/session/mysql"
  8. _ "github.com/astaxie/beego/session/redis"
  9. _ "github.com/go-sql-driver/mysql"
  10. "github.com/lifei6671/godoc/commands"
  11. "github.com/lifei6671/godoc/conf"
  12. "github.com/lifei6671/godoc/controllers"
  13. _ "github.com/lifei6671/godoc/routers"
  14. )
  15. func main() {
  16. commands.RegisterDataBase()
  17. commands.RegisterModel()
  18. commands.RegisterLogger()
  19. commands.RegisterCommand()
  20. commands.RegisterFunction()
  21. beego.SetStaticPath("uploads", "uploads")
  22. beego.ErrorController(&controllers.ErrorController{})
  23. 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)
  24. beego.Run()
  25. }