更新 main.go

This commit is contained in:
XOF
2025-12-14 21:45:36 +08:00
parent 7d4a922fef
commit 28f3ca514f

View File

@@ -44,7 +44,7 @@ var (
)
func loadEnv() {
password = "admin" // default
password = "htmlkit-admin" // default
port = "8080" // default
file, err := os.Open(".env")
@@ -78,11 +78,12 @@ func main() {
store = &Store{
Pages: make(map[string]*Page),
filename: "pages.json",
filename: "config/pages.json",
}
store.load()
os.MkdirAll("pages", 0755)
os.MkdirAll("config", 0755)
http.HandleFunc("/", handleIndex)
http.HandleFunc("/login", handleLogin)