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
relay_metadata.json
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
const (
viewsDir = "web/views/"
templatesDir = "web/views/templates/"
viewsDir = "app/views/"
templatesDir = "app/views/templates/"
)
// Define the common layout templates filenames

View File

@ -47,9 +47,9 @@ func main() {
func setupRoutes() *http.ServeMux {
mux := http.NewServeMux()
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) {
http.ServeFile(w, r, "web/static/img/favicon.ico")
http.ServeFile(w, r, "app/static/img/favicon.ico")
})
return mux
}