mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-21 16:17:13 +00:00
fix unchanged web-> app directories
This commit is contained in:
parent
de4bf2df16
commit
ae2f98aafc
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,4 +2,4 @@
|
||||
config.yml
|
||||
relay_metadata.json
|
||||
grain.exe
|
||||
/release
|
||||
/build
|
@ -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
|
||||
|
4
main.go
4
main.go
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user