Installing the web3 framework
The web3
library is an open source JavaScript library that can be used to connect to Ethereum nodes from the same or a remote computer. It allows IPC as well as an RPC to connect to Ethereum nodes. web3
is a client-side library and can be used alongside a web page and query, and can submit transactions to Ethereum nodes. It can be installed using npm
as a node module like the Solidity compiler. Let's take a look at the following steps to install the web3
JavaScript library:
- The command used to install
web3
is as follows:npm install web3
The preceding command generates the following output:
- After
web3
is installed, it can be used using the Node.js REPL. From Command Prompt, enter the Node.js workspace by executing thenode
command, as shown in the following screenshot: