octopush/cmd/server/commands/start.go

20 lines
384 B
Go
Raw Permalink Normal View History

2022-09-10 00:09:09 +02:00
package commands
import (
"git.front.kjuulh.io/kjuulh/octopush/internal/server"
2022-09-10 00:09:09 +02:00
"github.com/spf13/cobra"
"go.uber.org/zap"
)
2022-09-10 20:20:49 +02:00
func NewStartServerCommand(logger *zap.Logger) *cobra.Command {
2022-09-10 00:09:09 +02:00
cmd := &cobra.Command{
Use: "start",
Short: "Start the octopush server",
2022-09-10 00:09:09 +02:00
RunE: func(cmd *cobra.Command, args []string) error {
2022-09-10 20:20:49 +02:00
return server.Start(logger)
2022-09-10 00:09:09 +02:00
},
}
return cmd
}