Source code for Kauri series of articles on Creating a Blockchain | Blocks & Consensus
- Install Node & NPM
- Clone this respo
- Run
npm install
Start a node
node src/server.js port=<port>
Mine a block
curl -X POST "localhost:<port>/mine" -H 'Content-Type: application/json' -d'
{
"data": "Mine a block on node 1"
}
'
Add peer to node
curl -X POST "localhost:<port>/peers/add" -H 'Content-Type: application/json' -d'
{
"peers": ["http://<host>:<port>"]
}
'
Contributions are welcome! Please feel free to submit a PR and/or a Kauri article