feat(image-hoster): modularize into 3-file frontend architecture with backup

This commit is contained in:
2026-10-26 11:23:13 +05:30
parent 6c60b4ecb8
commit 641831bbf2
12 changed files with 3108 additions and 7556 deletions
+16
View File
@@ -57,12 +57,28 @@ func main() {
r.Get("/", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join(webDir, "index.html"))
})
r.Get("/styles.css", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/css; charset=utf-8")
http.ServeFile(w, r, filepath.Join(webDir, "styles.css"))
})
r.Get("/app.js", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/javascript; charset=utf-8")
http.ServeFile(w, r, filepath.Join(webDir, "app.js"))
})
r.Get("/radheradhe", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join(webDir, "admin.html"))
})
r.Get("/radheradhe/", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join(webDir, "admin.html"))
})
r.Get("/admin.css", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/css; charset=utf-8")
http.ServeFile(w, r, filepath.Join(webDir, "admin.css"))
})
r.Get("/admin.js", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/javascript; charset=utf-8")
http.ServeFile(w, r, filepath.Join(webDir, "admin.js"))
})
r.Post("/create_session", func(w http.ResponseWriter, r *http.Request) {
var req struct {