Compare commits
2 Commits
bug/conten
...
pierre_con
| Author | SHA1 | Date | |
|---|---|---|---|
| c7cf3b40fb | |||
| 852755ab42 |
@@ -1 +1 @@
|
|||||||
{"/home/pierre/oc-search/controllers":1697618043343849928}
|
{"/home/pierre/open-cloud/oc-search/controllers":1698307784301209722}
|
||||||
16
main.go
16
main.go
@@ -9,10 +9,22 @@ import (
|
|||||||
beego "github.com/beego/beego/v2/server/web"
|
beego "github.com/beego/beego/v2/server/web"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultConfigFile = "/etc/oc/search.json"
|
|
||||||
const localConfigFile = "./local_search.json"
|
|
||||||
|
|
||||||
func main() {
|
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 := logs.NewLogger(10000)
|
||||||
log.SetLogger("console")
|
log.SetLogger("console")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user