18 lines
268 B
Go
18 lines
268 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)
|
|
|
|
http.ListenAndServe(":8080", r)
|
|
}
|