Moved dev settings to flag

- Moved internal DEVELOPMENT_MODE flag to start parameters
This commit is contained in:
Toby Chui
2025-04-27 13:55:54 +08:00
parent ffc67ede12
commit 9781735983
6 changed files with 14 additions and 15 deletions

View File

@@ -101,7 +101,7 @@ func handleInjectHTML(w http.ResponseWriter, r *http.Request, relativeFilepath s
if len(relativeFilepath) > 0 && relativeFilepath[len(relativeFilepath)-1:] == "/" {
relativeFilepath = relativeFilepath + "index.html"
}
if DEVELOPMENT_BUILD {
if *development_build {
//Load from disk
targetFilePath := strings.ReplaceAll(filepath.Join("web/", relativeFilepath), "\\", "/")
content, err = os.ReadFile(targetFilePath)