Let's start building our API or our server to interact with our blockchain data structure. We will be building our API in a new file that we will put into our dev folder. Let's create a new file and call it api.js; this is where we will build our entire API:
Setting up Express.js
Installing Express.js
Now, we are going to use a library called Express.js to build a server or an API. Let's follow the below mentioned steps to install it:
- So, head over to Google, search for Express.js npm, and click on the first link ( https://www.npmjs.com/package/express ). This should take you to the following page:
- We have to install it as a dependency, so we must run the following command in our terminal:
Now we have...