In this section, we're going to test our register-nodes-bulk endpoint to make sure that it works properly. This will allow us to gain a clear understanding of how it works:
- To test the endpoint, we are going to head over to Postman. Here, we'll hit the localhost:3001/register-nodes-bulk endpoint. When we test this endpoint, we expect to receive some data, which is the allNetworkNodes array.
- Consequently, in the body tab inside Postman, with the raw option and JSON (application/json) format selected for the text, add the following lines of code to the body:
{ "allNetworkNodes": []}
- Inside of this array, there are going to be the URLs of all of the nodes that are already present in our blockchain ...