Migrate project from Vue to React and TypeScript
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
//go:build !prod
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
)
|
||||
|
||||
func getUIAssets() fs.FS {
|
||||
return os.DirFS("ui/dist")
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
//go:build prod
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/smjklake/glancr/ui"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
func getUIAssets() fs.FS {
|
||||
return ui.GetUIFS()
|
||||
}
|
||||
@@ -6,10 +6,12 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/smjklake/glancr/internal/fs"
|
||||
)
|
||||
|
||||
func spaHandler() http.HandlerFunc {
|
||||
fs := getUIAssets()
|
||||
fs := fs.GetUIAssets()
|
||||
fileServer := http.FileServer(http.FS(fs))
|
||||
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user