nacos config
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/fsconfig"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/conf"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
@@ -20,9 +19,8 @@ var configFile = flag.String("f", "etc/product-model.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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user