Fix static path (#289)

This commit is contained in:
Jonas Plum
2022-06-25 02:04:42 +03:00
committed by GitHub
parent b2fde8f26a
commit e679781981
2 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,8 @@ func main() {
} }
fsys, _ := fs.Sub(ui.UI, "dist") fsys, _ := fs.Sub(ui.UI, "dist")
theCatalyst.Server.Get("/ui/*", api.Static(fsys)) staticHandlerFunc := http.HandlerFunc(api.VueStatic(fsys))
theCatalyst.Server.Get("/ui/*", http.StripPrefix("/ui", staticHandlerFunc).ServeHTTP)
if err := http.ListenAndServe(fmt.Sprintf(":%d", config.Port), theCatalyst.Server); err != nil { if err := http.ListenAndServe(fmt.Sprintf(":%d", config.Port), theCatalyst.Server); err != nil {
log.Fatal(err) log.Fatal(err)

View File

@@ -1,5 +1,5 @@
module.exports = { module.exports = {
publicPath: "/ui/", publicPath: "/ui/static/",
transpileDependencies: ["vuetify", "@koumoul/vjsf"], transpileDependencies: ["vuetify", "@koumoul/vjsf"],
pwa: { pwa: {
name: "Catalyst", name: "Catalyst",