cmd

package
v0.0.0-...-e676b46 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v0.0.0-a.1"

shouldn't be here

Variables

View Source
var Commands = []*cli.Command{
	{
		Name:        "start",
		Category:    "run",
		Aliases:     []string{"s"},
		Description: "Starts the server in production mode.",
		Action:      run(false),
		Flags:       Flags,
	},
	{
		Name:        "dev",
		Category:    "run",
		Aliases:     []string{"d"},
		Description: "Starts the server in development mode",
		Action:      run(true),
		Flags:       Flags,
	},
}
View Source
var (
	ErrInvalidPort = errors.New("invalid port number")
)
View Source
var Flags = []cli.Flag{
	altsrc.NewIntFlag(&cli.IntFlag{
		Name:     "port",
		Value:    0,
		Usage:    "Defines the port which server should listen on",
		Required: false,
		Aliases:  []string{"p"},
		EnvVars:  []string{"PORT"},
	}),
	&cli.StringFlag{
		Name:    "load",
		Aliases: []string{"l"},
	},
}

Functions

func GetVersion

func GetVersion(cCtx *cli.Context) error

func LoadConfigFromEnv

func LoadConfigFromEnv(dev bool) (*config.Config, error)

LoadConfigFromEnv creates a Config from environment variables.

func StartServer

func StartServer(cfg *config.Config) error

StartServer starts the RMX application.

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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