Files
scrap/api/setup.go
2025-10-05 04:19:21 +02:00

19 lines
354 B
Go

package api
import (
"net/http"
"scrap/api/article"
"github.com/go-chi/chi"
)
func Setup() {
r := chi.NewRouter()
r.Get("/articles", article.ArticleQueryHandler)
r.Get("/articles-download", article.ArticleDownloadHandler)
r.Handle("/tiles/", http.StripPrefix("/tiles/", http.FileServer(http.Dir("tiles"))))
http.ListenAndServe(":8080", r)
}