Better build/watch

This commit is contained in:
Thomas Miceli
2023-04-06 11:47:30 +02:00
parent 9fadfe7cde
commit b606b67d43
10 changed files with 301 additions and 66 deletions

View File

@ -1,7 +1,6 @@
package main
import (
"embed"
"flag"
"fmt"
"github.com/rs/zerolog/log"
@ -14,9 +13,6 @@ import (
"path/filepath"
)
//go:embed templates/*/*.html public/manifest.json public/assets/*.js public/assets/*.css public/assets/*.svg
var embedFS embed.FS
func initialize() {
configPath := flag.String("config", "config.yml", "Path to a config file in YML format")
flag.Parse()
@ -61,7 +57,7 @@ func initialize() {
log.Fatal().Err(err).Msg("Failed to initialize database")
}
web.EmbedFS = embedFS
web.EmbedFS = dirFS
}
func main() {