[chore] embed filesystem
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-28 22:01:49 -05:00
parent 756db7a493
commit a34906c266
7 changed files with 43 additions and 37 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"embed"
"os"
"os/signal"
"sync"
@@ -11,6 +12,9 @@ import (
"reichard.io/bbank/server"
)
//go:embed templates/* assets/*
var assets embed.FS
type UTCFormatter struct {
log.Formatter
}
@@ -51,7 +55,7 @@ func cmdServer(ctx *cli.Context) error {
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)
// Start Server
server := server.NewServer()
server := server.NewServer(assets)
server.StartServer(&wg, done)
// Wait & Close