Initial commit
This commit is contained in:
15
app/controllers/routes.go
Normal file
15
app/controllers/routes.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func (server *Server) initializeRoutes() {
|
||||
server.Router = mux.NewRouter()
|
||||
server.Router.HandleFunc("/", server.Home).Methods("GET")
|
||||
|
||||
staticFileDirectory := http.Dir("./assets/")
|
||||
staticFileHandler := http.StripPrefix("/public/", http.FileServer(staticFileDirectory))
|
||||
server.Router.PathPrefix("/public/").Handler(staticFileHandler).Methods("GET")
|
||||
}
|
||||
Reference in New Issue
Block a user