[NAIVECHAIN README][https://github.com/lhartikk/naivechain/blob/master/README.md]
This version uses class heavily and add Proof of Work for the usage in presentation: Blockchain: Developer Perspective presented 29.09.2017 in Krakow on [KrakowJS Conference][conf.krakowjs.pl]
(set up two connected nodes and mine 1 block)
npm install
HTTP_PORT=3001 P2P_PORT=6001 npm start
HTTP_PORT=3002 P2P_PORT=6002 PEERS=ws://localhost:6001 npm start
curl -H "Content-type:application/json" --data '{"data" : "Some data to the first block"}' http://localhost:3001/mineBlock
(set up three connected nodes and mine a block)
docker-compose up
curl -H "Content-type:application/json" --data '{"data" : "Some data to the first block"}' http://localhost:3001/mineBlock
curl http://localhost:3001/blocks
curl -H "Content-type:application/json" --data '{"data" : "Some data to the first block"}' http://localhost:3001/mineBlock
curl -H "Content-type:application/json" --data '{"peer" : "ws://localhost:6001"}' http://localhost:3001/addPeer
curl http://localhost:3001/peers