You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
380 B
Go
14 lines
380 B
Go
package main
|
|
|
|
import "net/http"
|
|
|
|
func (app *application) routes() *http.ServeMux {
|
|
mux := http.NewServeMux()
|
|
fileServer := http.FileServer(http.Dir("./ui/static/"))
|
|
mux.Handle("/static", http.StripPrefix("/static", fileServer))
|
|
mux.HandleFunc("/", app.home)
|
|
mux.HandleFunc("/snippet/view", app.snippetView)
|
|
mux.HandleFunc("/snippet/create", app.snippetCreate)
|
|
return mux
|
|
}
|