devserver

package
v0.0.0-...-22e48d9 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 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 Config

type Config struct {
	// Stylesheets hold the extract stylesheets to add to the page
	Stylesheets []Resource
	Scripts     []Resource

	// Target WASM file
	TargetWasm string
}

Options for the dev server

type DevServer

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

DevServer manages the development server

func New

func New(config Config) *DevServer

func (*DevServer) ServeHTTP

func (ds *DevServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Resource

type Resource struct {
	// Href is
	Href string

	// Source is the file that this stylesheet should be fetched from.  Can be empty, in
	// which case this stylesheet will not be served.
	Source string

	// Cache manages the cache control of the resource.
	Cache bool
}

Jump to

Keyboard shortcuts

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