Added restful-api plugin

- Added restful-api example plugin
- Added more plugin docs
- Added zoraxy_plugin HandleFunc API
This commit is contained in:
Toby Chui
2025-05-30 15:57:59 +08:00
parent 29daa4402d
commit ddb1a8773e
34 changed files with 2376 additions and 5 deletions

View File

@@ -41,8 +41,8 @@ func main() {
func startWebServerInBackground() {
go func() {
server := &http.Server{Addr: ":8080", Handler: http.DefaultServeMux}
http.DefaultServeMux = http.NewServeMux()
server := &http.Server{Addr: ":8080", Handler: http.DefaultServeMux}
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.FileServer(http.Dir("./")).ServeHTTP(w, r)
})