// how to handle spa static like react, vue, svelte
func (h *Handler) handleStatic() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
normalPath := r.URL.Path
if !strings.HasPrefix(normalPath, "/") {
normalPath = "/" + normalPath
}
normalPath = path.Clean(normalPath)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"default": { | |
"id": "", | |
"name": "", | |
"description": "", | |
"priority": 1 | |
}, | |
"title": "NuanYun cloud python subject schema", |
registry=https://registry.npmmirror.com