small blockchain project
install all required node modules
npm install
bootnode / peer starts by default on HTTP_PORT 3001 and P2P_PORT 5001:
npm run dev
second peer which uses the predefined 5001 bootnode port to connect:
HTTP_PORT=3002 P2P_PORT=5002 PEERS=ws://localhost:5001 npm run dev
third peer connects to both nodes:
HTTP_PORT=3003 P2P_PORT=5003 PEERS=ws://localhost:5001,ws://localhost:5002 npm run dev
HTTP_PORT: used to communicate with the node from a users or miners perspective.
P2P_PORT: peer-to-peer port used by other nodes to exchange block / transaction information between nodes via websocket connection.