DEV Community

Discussion on: Trying to understand blockchain by making one!

Collapse
 
lavigi profile image
eva

That is absolutely brilliant, Damien. Nothing like seeing it with your own eyes in order to understand it. Many thanks :-)

To help out anyone who is not at all familiar with node (hello, anyone there? ;-) ) here's a very simple way to run this:

  1. Create a folder.
  2. In it, create both files index.js and blockchain.js as instructed in the article. Copy & paste respective code.
  3. Get a command prompt or a terminal to the folder that contains both files.
  4. Run npm init -y (this will create the package.json file)
  5. Run npm install js-sha256 (this will install the required module and update package.json)
  6. Just run the project with node index.js

Hope it helps.