Testing the /blockchain endpoint

Now we can test whether or not this endpoint works by using it in our browser:

  1. Let's go to our browser and hit localhost:3000/blockchain:

  1. As you can see, we get our entire blockchain back. Now, you might have noticed that this is a little bit difficult to read, so to make it readable, let's download a Chrome extension called JSON formatter. You can Google this and add the extension to your Chrome browser. Once installed, refresh the page again and you will get the following output:

As you can see, we get ...

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.