18 lines
417 B
Go
18 lines
417 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
"portfolio/api/webHandler"
|
|
)
|
|
|
|
func WebRoutes(mux **http.ServeMux) {
|
|
m := *mux
|
|
// Register the routes and webHandler
|
|
m.HandleFunc("GET /{$}", webHandler.InitHomepage)
|
|
m.HandleFunc("GET /projecten/{$}", webHandler.InitProjectpage)
|
|
|
|
m.HandleFunc("GET /test", webHandler.Test)
|
|
|
|
m.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("./templates/assets"))))
|
|
}
|