fix: change rpc endpoint to match nwaku

This commit is contained in:
Richard Ramos 2022-05-26 08:23:10 -04:00
parent c3e4262475
commit d872b28d8f
2 changed files with 3 additions and 1 deletions

View File

@ -299,6 +299,8 @@ func Execute(options Options) {
rpcServer.Start()
}
utils.Logger().Info("Node setup complete")
// Wait for a SIGINT or SIGTERM signal
ch := make(chan os.Signal, 1)
signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM)

View File

@ -72,7 +72,7 @@ func NewWakuRpc(node *node.WakuNode, address string, port int, enableAdmin bool,
}
mux := http.NewServeMux()
mux.HandleFunc("/jsonrpc", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
t := time.Now()
s.ServeHTTP(w, r)
wrpc.log.Infof("RPC request at %s took %s", r.URL.Path, time.Since(t))