server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a simple HTTP server for previewing the generated site

func New

func New(directory, port string) *Server

New creates a new preview server

func (*Server) CreateHandler added in v0.2.19

func (s *Server) CreateHandler() (http.Handler, error)

CreateHandler creates and returns the HTTP handler without starting the server. This is useful for testing and for embedding the server in other applications.

func (*Server) GetAddress added in v0.2.19

func (s *Server) GetAddress() string

GetAddress returns the server address in the format :port

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP server

Jump to

Keyboard shortcuts

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