handler

package module
v0.0.0-...-344ae5d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 4 Imported by: 1

README

handler

A http.Handler to serve vue dist.

Documentation

Overview

Package handler define custom http handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VueServer

func VueServer(fs http.FileSystem) http.Handler

VueServer create a http.Handler to serve vue dist. You can use it like this:

http.Handle("/", handler.VueServer(http.Dir("dist")))

It is useful when your project have HTML5 history mode.

https://router.vuejs.org/guide/essentials/history-mode.html#HTML5-Mode

Types

This section is empty.

Jump to

Keyboard shortcuts

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