the first version

This commit is contained in:
2025-09-07 14:21:48 +08:00
parent 0b983eeff2
commit ee62bee331
14 changed files with 996 additions and 0 deletions

17
index.go Normal file
View File

@@ -0,0 +1,17 @@
package main
import (
"fmt"
"net/http"
)
func indexHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Server", "MeowMusicEmbeddedServer")
w.Header().Set("Content-Type", "text/html; charset=utf-8")
fmt.Printf("[Web Access] Handling request for %s\n", r.URL.Path)
if r.URL.Path != "/" {
fileHandler(w, r)
return
}
fmt.Fprintf(w, "<h1>音乐服务器</h1>")
}