Serve Template and Static
This commit is contained in:
parent
e51abbcbf7
commit
b2761970ce
4 changed files with 85 additions and 8 deletions
10
main.go
10
main.go
|
@ -5,12 +5,20 @@ import (
|
|||
"log/slog"
|
||||
"os"
|
||||
|
||||
"embed"
|
||||
|
||||
"git.lastassault.de/speatzle/morffix/config"
|
||||
"git.lastassault.de/speatzle/morffix/server"
|
||||
"git.lastassault.de/speatzle/morffix/worker"
|
||||
"github.com/BurntSushi/toml"
|
||||
)
|
||||
|
||||
//go:embed tmpl
|
||||
var templates embed.FS
|
||||
|
||||
//go:embed static
|
||||
var static embed.FS
|
||||
|
||||
var conf config.Config
|
||||
|
||||
func main() {
|
||||
|
@ -31,7 +39,7 @@ func main() {
|
|||
|
||||
if *isserver {
|
||||
slog.Info("Starting Server...")
|
||||
server.Start(conf)
|
||||
server.Start(conf, templates, static)
|
||||
} else {
|
||||
slog.Info("Starting Worker...")
|
||||
worker.Start(conf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue