feat(frontend): add frontend files and handling

This commit is contained in:
2026-05-28 12:16:23 +02:00
parent 7347565cda
commit 2dfc206fea
6 changed files with 3490 additions and 4 deletions
+3
View File
@@ -14,6 +14,7 @@ var (
generateTokenFlag bool
deleteTokenFlag bool
datapath string
frontendkey string
)
func PrepareCommandLine() {
@@ -21,6 +22,7 @@ func PrepareCommandLine() {
flag.BoolVar(&generateTokenFlag, "tokengen", false, "Generate token with name")
flag.BoolVar(&deleteTokenFlag, "tokendel", false, "Delete token with name")
flag.StringVar(&datapath, "data", "/var/lib/svg-templater", "Override data directory")
flag.StringVar(&frontendkey, "frontendkey", "", "Specify the api key the frontend should use")
}
func HandleCommandline() {
@@ -45,6 +47,7 @@ func HandleCommandline() {
} else {
svg.Storage = svg.NewFileStorage(datapath, "public", "fonts")
server.PrepareHTTP()
server.PrepareFrontend(frontendkey)
server.Start()
}
}