fix unchanged web-> app directories

This commit is contained in:
0ceanSlim 2024-07-31 15:54:42 -04:00
parent de4bf2df16
commit ae2f98aafc
3 changed files with 5 additions and 5 deletions

2
.gitignore vendored
View File

@ -2,4 +2,4 @@
config.yml config.yml
relay_metadata.json relay_metadata.json
grain.exe grain.exe
/release /build

View File

@ -37,8 +37,8 @@ func RootHandler(w http.ResponseWriter, r *http.Request) {
// Define the base directories for views and templates // Define the base directories for views and templates
const ( const (
viewsDir = "web/views/" viewsDir = "app/views/"
templatesDir = "web/views/templates/" templatesDir = "app/views/templates/"
) )
// Define the common layout templates filenames // Define the common layout templates filenames

View File

@ -47,9 +47,9 @@ func main() {
func setupRoutes() *http.ServeMux { func setupRoutes() *http.ServeMux {
mux := http.NewServeMux() mux := http.NewServeMux()
mux.HandleFunc("/", ListenAndServe) mux.HandleFunc("/", ListenAndServe)
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static")))) mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("app/static"))))
mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "web/static/img/favicon.ico") http.ServeFile(w, r, "app/static/img/favicon.ico")
}) })
return mux return mux
} }