Merge branch 'main' of github.com:Theodor-Springmann-Stiftung/kgpz_web

This commit is contained in:
Simon Martens
2024-11-14 22:18:56 +01:00
2 changed files with 13 additions and 2 deletions

View File

@@ -28,7 +28,18 @@ type KGPZ struct {
}
func (k *KGPZ) Init() {
if k.Config.Debug {
// NOTE: validity checks for poor people, speeding up dev mode:
if _, err := os.Stat(k.Config.FolderPath); err != nil {
k.initRepo()
} else {
go k.initRepo()
}
k.Serialize()
return
}
k.initRepo()
k.Serialize()
}

View File

@@ -62,7 +62,7 @@ func (s *Server) Start() {
}
srv.Use(recover.New())
srv.Use(STATIC_PREFIX, static(&views.StaticFS, STATIC_PREFIX))
srv.Use(STATIC_PREFIX, static(&views.StaticFS))
srv.Get("/", func(c *fiber.Ctx) error {
return c.SendString("I'm a GET request!")