cmd

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebCommand = &cli.Command{
	Name:   "web",
	Usage:  "Starts the web server",
	Action: RunWebServer,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:     "secret-key",
			Usage:    "Secret Key (e.g. to encrypt cookies). Create a new key with 'openssl rand -base64 32'",
			Required: true,
			EnvVars:  []string{"SECRET_KEY"},
		},
		&cli.StringFlag{
			Name:    "listen-address",
			Usage:   "The interface address where the web server should listen on",
			EnvVars: []string{"LISTEN_ADDRESS"},
			Value:   "odootools.127.0.0.1.nip.io:4200",
		},
		&cli.StringFlag{
			Name:    "tls-cert",
			Usage:   "The path to a certificate file to serve",
			EnvVars: []string{"TLS_CERT"},
		},
		&cli.StringFlag{
			Name:    "tls-key",
			Usage:   "The path to a certificate private key file to serve",
			EnvVars: []string{"TLS_KEY"},
		},
	},
}

Functions

func RunWebServer

func RunWebServer(cli *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL