initial commit

This commit is contained in:
ycc
2023-03-03 14:43:11 +01:00
parent 7229007847
commit 88c21d1828
142 changed files with 13975 additions and 22 deletions

31
main.go Normal file
View File

@@ -0,0 +1,31 @@
package main
import (
"os"
"cloud.o-forge.io/core/oc-catalog/routers"
"cloud.o-forge.io/core/oc-catalog/services"
beego "github.com/beego/beego/v2/server/web"
)
func main() {
// If we have any parameter, we run the beego directly
if len(os.Args) > 1 {
beego.Run()
}
routers.Init()
services.Init()
if beego.BConfig.RunMode == "dev" {
// beego.BConfig.WebConfig.DirectoryIndex = true
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
}
beego.Run()
defer func() {
services.MongoDisconnect()
}()
}