[chore] embed filesystem
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
6
main.go
6
main.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user