2024-03-13 14:39:10 +01:00
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
2024-03-13 15:54:09 +01:00
|
|
|
"portfolio/api/webHandler"
|
2024-03-13 14:39:10 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func WebRoutes(mux **http.ServeMux) {
|
|
|
|
|
m := *mux
|
|
|
|
|
// Register the routes and webHandler
|
2024-03-13 15:54:09 +01:00
|
|
|
m.HandleFunc("GET /{$}", webHandler.InitHomepage)
|
2024-03-14 19:24:41 +01:00
|
|
|
m.HandleFunc("GET /projecten/{$}", webHandler.InitProjectpage)
|
|
|
|
|
|
|
|
|
|
m.HandleFunc("GET /test", webHandler.Test)
|
|
|
|
|
|
|
|
|
|
m.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("./templates/assets"))))
|
2024-03-13 14:39:10 +01:00
|
|
|
}
|