Dodavanje podešavanja u bazu, logo zona sa tri opcije

This commit is contained in:
2026-06-01 01:16:37 +02:00
parent 3b9e0c081a
commit acf8cada0e
7 changed files with 123 additions and 31 deletions
+5 -2
View File
@@ -47,16 +47,19 @@ func main() {
}
log.Println("Migracije uspešno izvršene")
// kreiramo handler sa bazom
h := handler.Novi(db)
r := chi.NewRouter()
// statični fajlovi — CSS, JS, slike
// statični fajlovi
r.Handle("/static/*", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
// rute
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/dashboard", http.StatusFound)
})
r.Get("/dashboard", handler.Dashboard)
r.Get("/dashboard", h.Dashboard)
log.Printf("NTech pokrenut na portu %s", port)
err = http.ListenAndServe(":"+port, r)