|
@@ -2,6 +2,7 @@ package server
|
|
|
|
|
|
import (
|
|
|
"github.com/go-chi/chi/v5"
|
|
|
+ "godash/files"
|
|
|
"net/http"
|
|
|
)
|
|
|
|
|
@@ -15,6 +16,12 @@ func (server *Server) setupRouter() {
|
|
|
})
|
|
|
r.Get("/weather", getWeather)
|
|
|
})
|
|
|
+ server.Router.Get("/robots.txt", func(w http.ResponseWriter, r *http.Request) {
|
|
|
+ http.ServeFile(w, r, files.TemplatesFolder+"/robots.txt")
|
|
|
+ })
|
|
|
+ server.Router.Get("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
|
|
|
+ http.ServeFile(w, r, "static/favicon/favicon.ico")
|
|
|
+ })
|
|
|
server.serveStatic("static")
|
|
|
server.serveStatic("storage/icons")
|
|
|
server.Router.NotFound(func(w http.ResponseWriter, r *http.Request) {
|