MCPcopy Create free account
hub / github.com/ethereum/node-crawler / HandleRequests

Method HandleRequests

pkg/api/api.go:51–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func (a *Api) HandleRequests() {
52 router := mux.NewRouter().StrictSlash(true)
53 router.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello")) })
54 router.HandleFunc("/v1/dashboard", a.handleDashboard).Queries("filter", "{filter}")
55 router.HandleFunc("/v1/dashboard", a.handleDashboard)
56 log.Info("Starting API", "address", a.address)
57 http.ListenAndServe(a.address, router)
58}
59
60type client struct {
61 Name string `json:"name"`

Callers 1

startAPIFunction · 0.80

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected