site

package
v0.0.0-...-3f83494 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: CC-BY-4.0 Imports: 9 Imported by: 0

Documentation

Overview

Package site provides a server for serving a static site.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Log *zap.Logger
	Dev bool

	Port      int
	Interface string
}

Config provides configuration for the web server.

type Server

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

Server provides operations to encapsulate the functionality needed for operating a web server.

func NewServer

func NewServer(c Config) *Server

NewServer initializes the server with the given configuration.

func (*Server) Serve

func (s *Server) Serve() error

Serve blocks forever, starting the server on the configured address.

Jump to

Keyboard shortcuts

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