17 lines
346 B
Go
17 lines
346 B
Go
package main
|
|
|
|
import "net/http"
|
|
import "github.com/go-chi/chi"
|
|
|
|
func (app *application) routes() http.Handler {
|
|
r := chi.NewRouter()
|
|
|
|
fileServer := http.FileServer(http.Dir("./ui/static"))
|
|
r.Handle("/static/*", http.StripPrefix("/static", fileServer))
|
|
|
|
r.Get("/", app.home)
|
|
r.Get("/generate", app.generateRss)
|
|
|
|
return r
|
|
}
|