server

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDocumentRoot = "public"

DefaultDocumentRoot is the directory beneath an application root served over HTTP when the configuration names none.

View Source
const Name = "Run php server"

Name is the command title.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(config config.Config) *cli.Command

NewCommand creates a new server command.

func NewHandler added in v0.2.0

func NewHandler(root fs.FS) (http.Handler, error)

NewHandler serves annotated project routes and files beneath public/.

func Run

func Run(ctx context.Context, args []string, appConfig config.Config) error

Run starts the platform lifecycle and waits for shutdown.

Types

type Module

type Module struct {
	platform.UnimplementedModule
	// contains filtered or unexported fields
}

Module implements the platform.Module interface.

func NewModule

func NewModule(root, documentRoot string, options runner.Options, flatstack, autoindex bool, observers ...runner.Observer) (*Module, error)

NewModule creates the HTTP module serving one application root.

func (*Module) Mount

func (m *Module) Mount(_ context.Context, r platform.Router) error

Mount registers HTTP routes.

Jump to

Keyboard shortcuts

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