chore: more work on moving to svelte front end

This commit is contained in:
2024-03-01 23:03:25 +00:00
parent ce866725ff
commit e990b832d3
22 changed files with 1799 additions and 218 deletions

View File

@@ -31,7 +31,7 @@ func main() {
panic(err)
}
defer db.Close()
log.Info("Starting server on :8000!")
log.Info("Starting server on :5002!")
//TODO check if file structure exists to save data
handle := NewHandler(db)
@@ -48,6 +48,7 @@ func main() {
handle.StaticFiles("/js/", ".js", "text/javascript")
handle.ReadFiles("/imgs/", "views", ".png", "image/png;")
handle.ReadTypesFiles("/savedData/", ".", []string{".png", ".jpeg"}, []string{"image/png", "image/jpeg"})
handle.ReadTypesFiles("/api/savedData/", ".", []string{".png", ".jpeg"}, []string{"image/png", "image/jpeg"})
handle.GetHTML("/", AnswerTemplate("index.html", nil, 0))