mirror of
https://github.com/0ceanSlim/grain.git
synced 2024-11-22 00:27:14 +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
|
config.yml
|
||||||
relay_metadata.json
|
relay_metadata.json
|
||||||
grain.exe
|
grain.exe
|
||||||
/release
|
/build
|
@ -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
|
||||||
|
4
main.go
4
main.go
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user