feat(image-hoster): modularize into 3-file frontend architecture with backup
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user