mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 07:34:06 +00:00
Load tempaltes on startup
This commit is contained in:
parent
3ef2923e52
commit
f5f003298e
@ -6,6 +6,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"github.com/1f349/lavender/server"
|
"github.com/1f349/lavender/server"
|
||||||
|
"github.com/1f349/lavender/server/pages"
|
||||||
"github.com/1f349/violet/utils"
|
"github.com/1f349/violet/utils"
|
||||||
exit_reload "github.com/MrMelon54/exit-reload"
|
exit_reload "github.com/MrMelon54/exit-reload"
|
||||||
"github.com/MrMelon54/mjwt"
|
"github.com/MrMelon54/mjwt"
|
||||||
@ -71,6 +72,11 @@ func normalLoad(startUp server.Conf, wd string) {
|
|||||||
log.Fatal("[Lavender] Failed to load or create MJWT signer:", err)
|
log.Fatal("[Lavender] Failed to load or create MJWT signer:", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = pages.LoadPages(wd)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal("[Lavender] Failed to load page templates:", err)
|
||||||
|
}
|
||||||
|
|
||||||
srv := server.NewHttpServer(startUp, mSign)
|
srv := server.NewHttpServer(startUp, mSign)
|
||||||
log.Printf("[Lavender] Starting HTTP server on '%s'\n", srv.Addr)
|
log.Printf("[Lavender] Starting HTTP server on '%s'\n", srv.Addr)
|
||||||
go utils.RunBackgroundHttp("HTTP", srv)
|
go utils.RunBackgroundHttp("HTTP", srv)
|
||||||
|
Loading…
Reference in New Issue
Block a user