2 Commits

Author SHA1 Message Date
pb
c7cf3b40fb Improved conf and dockerisation 2024-02-19 17:53:33 +01:00
pb
852755ab42 changed the way oc-catalog API is constructed 2023-10-26 10:59:21 +02:00
3 changed files with 15 additions and 3 deletions

View File

@@ -1 +1 @@
{"/home/pierre/oc-search/controllers":1697618043343849928}
{"/home/pierre/open-cloud/oc-search/controllers":1698307784301209722}

16
main.go
View File

@@ -9,10 +9,22 @@ import (
beego "github.com/beego/beego/v2/server/web"
)
const defaultConfigFile = "/etc/oc/search.json"
const localConfigFile = "./local_search.json"
func main() {
loadConfig()
beego.BConfig.WebConfig.Session.SessionOn = true
beego.SetStaticPath("/favicon.ico", "/static/favicon.ico")
beego.BConfig.WebConfig.DirectoryIndex = true
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
beego.Run()
}
// Initialising the config in the init so that the oc-catalog API receives it
func loadConfig(){
log := logs.NewLogger(10000)
log.SetLogger("console")

BIN
oc-search

Binary file not shown.