新增单进程模式

This commit is contained in:
flswld committed 2024-07-18 00:56:30 +08:00
1 parent 669a524153
commit 6136e57919
73 files changed
+1900 -153

No files matched your search

+3 -1
View File
@@ -3,6 +3,7 @@ package main
import (
"context"
cfg "hk4e/common/config"
"hk4e/node/app"
"github.com/spf13/cobra"
@@ -14,7 +15,8 @@ func NodeCmd() *cobra.Command {
Use: "node",
Short: "node server",
RunE: func(cmd *cobra.Command, args []string) error {
return app.Run(context.Background(), configFile)
cfg.InitConfig(configFile)
return app.Run(context.Background())
},
}
c.Flags().StringVar(&configFile, "config", "application.toml", "config file")