[server] Serve public resources

This commit is contained in:
Abhishek Shroff
2024-10-25 16:14:08 +05:30
parent 4670da07c1
commit dcbb581bc1
8 changed files with 113 additions and 72 deletions
+2
View File
@@ -2,6 +2,7 @@ package serve
import (
"github.com/fvbock/endless"
"github.com/shroff/phylum/server/internal/api/public"
apiv1 "github.com/shroff/phylum/server/internal/api/v1"
"github.com/shroff/phylum/server/internal/api/webdav"
"github.com/sirupsen/logrus"
@@ -19,6 +20,7 @@ func SetupCommand() *cobra.Command {
webdav.SetupHandler(engine.Group(config.GetString("webdav_prefix")))
apiv1.Setup(engine.Group("/api/v1"))
public.Setup(engine.Group("/public"))
server := endless.NewServer(config.GetString("listen"), engine)
server.BeforeBegin = func(addr string) {