Discovery set up

This commit is contained in:
mr
2026-01-15 13:35:11 +01:00
parent 39e3a6a135
commit 24cb25c350
12 changed files with 1015 additions and 16 deletions

View File

@@ -1,6 +1,9 @@
package main
import (
"context"
"oc-peer/conf"
"oc-peer/infrastructure"
_ "oc-peer/routers"
oclib "cloud.o-forge.io/core/oc-lib"
@@ -27,6 +30,9 @@ func main() {
o.GetStringDefault("LOG_LEVEL", "info"),
)
conf.GetConfig().PublicKeyPath = o.GetStringDefault("PUBLIC_KEY_PATH", "./pem/public.pem")
conf.GetConfig().PrivateKeyPath = o.GetStringDefault("PRIVATE_KEY_PATH", "./pem/private.pem")
conf.GetConfig().DHTEndpointPort = o.GetInt64Default("DHT_ENDPOINT_PORT", 80)
// Beego init
beego.BConfig.AppName = appname
beego.BConfig.Listen.HTTPPort = o.GetIntDefault("port", 8080)
@@ -41,5 +47,6 @@ func main() {
ExposeHeaders: []string{"Content-Length", "Content-Type"},
AllowCredentials: true,
}))
infrastructure.Init(context.Background())
beego.Run()
}