First commit adding boilerplate and organization.

This commit is contained in:
2025-01-25 15:27:52 -07:00
parent 2df8441a44
commit a3ac233f39
38 changed files with 5805 additions and 0 deletions

13
cmd/server/fs_dev.go Normal file
View File

@@ -0,0 +1,13 @@
// +build !prod
package server
import (
"io/fs"
"os"
)
func getUIAssets() fs.FS {
return os.DirFS("ui/dist")
}

20
cmd/server/fs_prod.go Normal file
View File

@@ -0,0 +1,20 @@
// +build prod
package server
import (
"embed"
"io/fs"
)
//go:embed frontend/dist
var embedFrontend embed.FS
func getFrontendAssets() fs.FS {
f, err := fs.Sub(embedFrontend, "ui/dist")
if err != nil {
panic(err)
}
return f
}

5
cmd/server/main.go Normal file
View File

@@ -0,0 +1,5 @@
package server
func main() {
frontend := getUIAssets()
}