Index functions

This commit is contained in:
Simon Martens
2025-03-26 16:18:53 +01:00
parent dd24aea0a3
commit 052f21e87a
10 changed files with 240 additions and 23 deletions

View File

@@ -43,12 +43,14 @@ func main() {
}
// INFO: the lib, engine and storage objects passed to the server should never be recreated.
err = xmlmodels.New(dir, commit.Hash)
lib, err := xmlmodels.Parse(dir, commit.Hash)
if err != nil {
panic(err)
}
engine := templating.New(&views.LayoutFS, &views.RoutesFS)
engine.AddFuncs(lib.FuncMap())
storage := memory.New(memory.Config{
GCInterval: 24 * time.Hour,
})