Added: downloading and returning wikipedia articles
This commit is contained in:
17
api/setup.go
Normal file
17
api/setup.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user