Commented out some bs
This commit is contained in:
parent
36ce2e9de8
commit
9a70d1130d
22
main.go
22
main.go
|
@ -62,20 +62,20 @@ func main() {
|
|||
}
|
||||
defer db.Close()
|
||||
|
||||
customHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// Don't handle /static/ paths here - let the static file server handle those
|
||||
if strings.HasPrefix(r.URL.Path, "/static/") {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
// customHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// // Don't handle /static/ paths here - let the static file server handle those
|
||||
// if strings.HasPrefix(r.URL.Path, "/static/") {
|
||||
// http.NotFound(w, r)
|
||||
// return
|
||||
// }
|
||||
|
||||
// For all other routes, serve index.html
|
||||
indexPath := filepath.Join(staticPath, "index.html")
|
||||
http.ServeFile(w, r, indexPath)
|
||||
})
|
||||
// // For all other routes, serve index.html
|
||||
// indexPath := filepath.Join(staticPath, "index.html")
|
||||
// http.ServeFile(w, r, indexPath)
|
||||
// })
|
||||
|
||||
// Register the catch-all handler for non-static routes
|
||||
staticRouter.PathPrefix("/").Handler(customHandler)
|
||||
//staticRouter.PathPrefix("/").Handler(customHandler)
|
||||
|
||||
fmt.Println("Default user 'boxuser' created successfully!")
|
||||
|
||||
|
|
Loading…
Reference in New Issue