main.go 519 B

12345678910111213141516171819202122232425262728
  1. package main
  2. import (
  3. _ "github.com/go-sql-driver/mysql"
  4. _ "github.com/lifei6671/godoc/routers"
  5. "github.com/astaxie/beego"
  6. "github.com/lifei6671/godoc/commands"
  7. "fmt"
  8. "os"
  9. "github.com/lifei6671/godoc/controllers"
  10. )
  11. func main() {
  12. commands.RegisterDataBase()
  13. commands.RegisterModel()
  14. commands.RegisterLogger()
  15. commands.RegisterCommand()
  16. commands.RegisterFunction()
  17. beego.SetStaticPath("uploads","uploads")
  18. fmt.Println(os.Args[0])
  19. beego.ErrorController(&controllers.ErrorController{})
  20. beego.Run()
  21. }