/private_blockchain

Udacity Blockchain Nanodegree project: create a private blockchain

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Private Blockchain Project

In this project I created a private blockchain.
I implemented the classes defining the data structure for the blocks and the chain.
In order to be able to persist my blochchain I used LevelDB.
Finally I implemented GET and POST API endpoints using the hapijs framework.

Getting Started

  1. Download or clone the repository
  2. Install project dependencies: npm install
  3. Start the web service: node app.js

API endpoints

The server runs locally by default on port 8000.
You may select a different one by updating the PORT parameter of the BlockAPI constructor in app.js.

  • /api/block/height: to retrieve a block by its height/index.
  • /api/block: to add a new block ("data=block's content")

Resources