2024-05-16 18:42:31 +02:00
|
|
|
package web
|
2024-05-16 17:59:21 +02:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
2024-05-16 21:29:31 +02:00
|
|
|
handlers2 "portfolio/api/handlers"
|
2024-05-16 17:59:21 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func WebRoutes() *http.ServeMux {
|
|
|
|
|
// Create a new request multiplexer
|
|
|
|
|
// Take incoming requests and dispatch them to the matching webHandler
|
|
|
|
|
mux := http.NewServeMux()
|
|
|
|
|
|
|
|
|
|
// Register the routes and webHandler
|
2024-05-16 21:29:31 +02:00
|
|
|
mux.HandleFunc("/", handlers2.CatchAllHandler)
|
2024-05-16 17:59:21 +02:00
|
|
|
|
|
|
|
|
return mux
|
|
|
|
|
}
|