A quick recap of how the register-and-broadcast-node endpoint functions 

Now let's run through this endpoint again for a quick summary of what we did in this endpoint so that we have a better understanding of this. Whenever we want to register a new node with our network, the register-and-broadcast-node endpoint is the first point that we want to hit. The first thing that we're doing inside of this endpoint is taking the newNodeUrl and registering it with the current node by pushing it into our networkNodes array.

The next step that we have to make is to broadcast this newNodeUrl to the rest of the nodes in our network. We are doing that inside of the forEach loop. All that's happening inside of this for loop is we're making a request to ...

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.