Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"default": {
"id": "",
"name": "",
"description": "",
"priority": 1
},
"title": "NuanYun cloud python subject schema",
@cheerfyt
cheerfyt / handler.md
Last active July 5, 2022 02:44
golang embed spa static
// 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)
@cheerfyt
cheerfyt / npmrc.md
Last active June 4, 2022 08:11
npm_taobao_registry
registry=https://registry.npmmirror.com