Initial commit

This commit is contained in:
2023-11-10 15:57:52 +01:00
commit eb87e1912f
351 changed files with 51965 additions and 0 deletions

15
app/controllers/routes.go Normal file
View 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")
}