nacos config

This commit is contained in:
eson
2023-09-19 17:34:10 +08:00
parent 7fd65d9ac7
commit 4f37274438
75 changed files with 82 additions and 1141 deletions

View File

@@ -14,7 +14,6 @@ import (
"fusenapi/server/websocket/internal/handler"
"fusenapi/server/websocket/internal/svc"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
)
@@ -23,9 +22,8 @@ var configFile = flag.String("f", "etc/websocket.yaml", "the config file")
func main() {
flag.Parse()
cfgContent := fsconfig.StartNacosConfig(*configFile, nil)
var c config.Config
conf.LoadConfigFromYamlBytes([]byte(cfgContent), &c)
fsconfig.StartNacosConfig(*configFile, &c, nil)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
}))