2022-09-10 00:09:09 +02:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2022-09-21 22:55:52 +02:00
|
|
|
"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",
|
2022-09-21 22:55:52 +02:00
|
|
|
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
|
|
|
|
}
|