Server is the entrypoint for the server command.
(cfg *config.Config)
| 12 | |
| 13 | // Server is the entrypoint for the server command. |
| 14 | func Server(cfg *config.Config) *cobra.Command { |
| 15 | return &cobra.Command{ |
| 16 | Use: "server", |
| 17 | Short: "start a fullstack server (runtime and all services in supervised mode)", |
| 18 | PreRunE: func(cmd *cobra.Command, args []string) error { |
| 19 | return configlog.ReturnError(parser.ParseConfig(cfg, false)) |
| 20 | }, |
| 21 | GroupID: CommandGroupServer, |
| 22 | RunE: func(cmd *cobra.Command, args []string) error { |
| 23 | // Prefer the in-memory registry as the default when running in single-binary mode |
| 24 | r := runtime.New(cfg) |
| 25 | return r.Start(cmd.Context()) |
| 26 | }, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func init() { |
| 31 | register.AddCommand(Server) |
nothing calls this directly
no test coverage detected