Skip to content

Commit

Permalink
Merge branch 'pk910/mini-launchpad' into pk910/trigger-el-requests
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Nov 4, 2024
2 parents e982514 + e22314b commit d195243
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/dora-explorer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"flag"
"io/fs"
"net"
"net/http"
_ "net/http/pprof"
Expand Down Expand Up @@ -191,8 +192,10 @@ func startFrontend(webserver *http.Server) {
router.PathPrefix("/js").Handler(http.StripPrefix("/js/", jsHandler))
} else {
// serve dora ui package from go embed
uiFileSys := http.FS(uipackage.Files)
router.PathPrefix("/ui-package").Handler(handlers.CustomFileServer(http.FileServer(uiFileSys), uiFileSys, handlers.NotFound))
uiEmbedFS, _ := fs.Sub(uipackage.Files, "dist")
uiFileSys := http.FS(uiEmbedFS)
uiHandler := handlers.CustomFileServer(http.FileServer(uiFileSys), uiFileSys, handlers.NotFound)
router.PathPrefix("/ui-package").Handler(http.StripPrefix("/ui-package/", uiHandler))
}

// serve static files from go embed
Expand Down

0 comments on commit d195243

Please sign in to comment.