main.go 409 B

123456789101112131415161718192021
  1. package main
  2. import (
  3. _ "eta/eta_data_analysis/routers"
  4. "eta/eta_data_analysis/services"
  5. beego "github.com/beego/beego/v2/server/web"
  6. )
  7. func main() {
  8. if beego.BConfig.RunMode == "dev" {
  9. beego.BConfig.WebConfig.DirectoryIndex = true
  10. beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
  11. }
  12. go services.Task()
  13. // 最大内存调整
  14. beego.BConfig.MaxMemory = 1024 * 1024 * 512
  15. beego.Run()
  16. }