deprecated-oc-search/main.go

29 lines
648 B
Go

package main
import (
conf "oc-search/conf"
_ "oc-search/routers"
_ "oc-search/views"
"github.com/beego/beego/logs"
beego "github.com/beego/beego/v2/server/web"
)
const defaultConfigFile = "/etc/oc/search.json"
const localConfigFile = "./local_search.json"
func main() {
log := logs.NewLogger(10000)
log.SetLogger("console")
beego.BConfig.WebConfig.Session.SessionOn = true
beego.SetStaticPath("/favicon.ico", "/static/favicon.ico")
beego.BConfig.WebConfig.DirectoryIndex = true
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
logs.Info("Will contact oc-catalog at : %v", conf.GetConfig().OcCatalogUrl)
beego.Run()
}