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

@@ -12,7 +12,6 @@ import (
"fusenapi/server/auth/internal/handler"
"fusenapi/server/auth/internal/svc"
"github.com/zeromicro/go-zero/core/conf"
"github.com/zeromicro/go-zero/rest"
)
@@ -21,9 +20,8 @@ var configFile = flag.String("f", "etc/auth.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) {
}))

View File

@@ -5,6 +5,5 @@ import (
)
func TestMain(t *testing.T) {
main()
}