cmd

package
v0.0.0-...-cfbe396 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerCmd = &cobra.Command{
	Use:   "server",
	Short: "start the server",
	Long:  "start a server with the configuration given by `--config` on the address given by `--address`. The server will run until stopped.",
	RunE: func(cmd *cobra.Command, args []string) error {

		configBytes, err := ioutil.ReadFile(viper.GetString("config"))
		if err != nil {
			return err
		}

		config, err := store.FromConfig(configBytes)
		if err != nil {
			return err
		}

		web.Run(viper.GetString("address"), config)
		return nil
	},
}

ServerCmd starts the server

Functions

func ServerFlags

func ServerFlags()

ServerFlags binds flags to the server

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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