main.go 303 B

123456789101112131415161718
  1. package main
  2. import (
  3. _ "eta/eta_hub/routers"
  4. "github.com/beego/beego/v2/server/web"
  5. "eta/eta_hub/services"
  6. )
  7. func main() {
  8. if web.BConfig.RunMode == "dev" {
  9. web.BConfig.WebConfig.DirectoryIndex = true
  10. web.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
  11. }
  12. services.Task()
  13. web.Run()
  14. }