feat(web): add static file serving for the frontend

This commit is contained in:
2026-09-10 20:43:46 +08:00
parent 160918a93e
commit f6af57cf58
3 changed files with 102 additions and 2 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import (
"nukumizu-backend/handler"
"nukumizu-backend/postLog"
"nukumizu-backend/web"
)
// SetupRouter registers all HTTP routes and returns a configured ServeMux.
@@ -38,8 +39,8 @@ func SetupRouter() *http.ServeMux {
mux.HandleFunc("/api/system/getLogs", logSocketHandler.Handle)
}
// Catch-all 404 handler.
mux.HandleFunc("/", NotFoundHandler)
// Static file serving for the web frontend.
mux.HandleFunc("/", web.ServeStatic)
postLog.Info("Router setup completed")
return mux