From 64e01b0bb21fbb8e70362e2b2df6fb4f0c316d35 Mon Sep 17 00:00:00 2001 From: yanghao05 Date: Mon, 28 Apr 2025 20:46:09 +0800 Subject: [PATCH] feat: add files --- backend/app/service/http/http.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/app/service/http/http.go b/backend/app/service/http/http.go index 968032f..2cc20bc 100644 --- a/backend/app/service/http/http.go +++ b/backend/app/service/http/http.go @@ -123,7 +123,10 @@ func Serve(cmd *cobra.Command, args []string) error { file, err := fabfile.Find(filepath.Join(svc.App.DistAdmin, f)) if err != nil { - return ctx.SendStatus(fiber.StatusNotFound) + file, err = fabfile.Find(filepath.Join(svc.App.DistAdmin, "index.html")) + if err != nil { + return ctx.SendStatus(fiber.StatusNotFound) + } } return ctx.SendFile(file) })