main.go 281 B

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