angular

package module
v0.0.0-...-b3c8f48 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 4 Imported by: 0

README

Golang Angular helpers

angular.Filesystem

Server a static directory (e.g. by embedding) as native go http server: import ( "embed" "io/fs" "net/http"

"github.com/vogtp/go-angular"

)

//go:embed static
var staticWeb embed.FS

fsys, err := fs.Sub(staticWeb, "static")
if err != nil {
	panic(err)
}
ngFS := angular.FileSystem(fsys)
http.Handle("/", http.FileServer(ngFS))
http.ListenAndServe(":8080", nil)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileSystem

func FileSystem(fs fs.FS) http.FileSystem

FileSystem creates a filesystem that is capable of serving angular web apps

Types

This section is empty.

Jump to

Keyboard shortcuts

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