govote/cmd/serve.go

22 lines
408 B
Go
Raw Normal View History

2024-05-12 22:47:24 +00:00
package cmd
import (
"code.c-base.org/baccenfutter/govote/http"
"github.com/urfave/cli/v2"
)
var serveCmd = &cli.Command{
2024-05-13 08:45:38 +00:00
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"))
},
2024-05-12 22:47:24 +00:00
}