govote/cmd/serve.go
2024-05-13 00:47:24 +02:00

22 lines
427 B
Go

package cmd
import (
"code.c-base.org/baccenfutter/govote/http"
"github.com/urfave/cli/v2"
)
var serveCmd = &cli.Command{
Name: "serve",
Usage: "Start the HTTP server",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "bind-address",
Usage: "The TCP address:port to bind to",
Value: ":3000",
},
},
Action: func(ctx *cli.Context) error {
return http.Serve(ctx.String("bind-address"))
},
}