main.go 824 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package main
  2. import (
  3. _ "github.com/go-sql-driver/mysql"
  4. _ "github.com/lifei6671/godoc/routers"
  5. _ "github.com/astaxie/beego/session/redis"
  6. _ "github.com/astaxie/beego/session/memcache"
  7. _ "github.com/astaxie/beego/session/mysql"
  8. "github.com/astaxie/beego"
  9. "github.com/lifei6671/godoc/commands"
  10. "fmt"
  11. "os"
  12. "github.com/lifei6671/godoc/controllers"
  13. )
  14. var (
  15. VERSION string
  16. BUILD_TIME string
  17. GO_VERSION string
  18. )
  19. func main() {
  20. fmt.Printf("MinDoc version => %s\nbuild time => %s\nstart directory => %s\n%s\n", VERSION, BUILD_TIME, os.Args[0],GO_VERSION)
  21. commands.RegisterDataBase()
  22. commands.RegisterModel()
  23. commands.RegisterLogger()
  24. commands.RegisterCommand()
  25. commands.RegisterFunction()
  26. beego.SetStaticPath("uploads","uploads")
  27. beego.ErrorController(&controllers.ErrorController{})
  28. beego.Run()
  29. }