Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Udacity Blockchain Nanodegree project: create a private blockchain

License

Notifications You must be signed in to change notification settings

sripwoud/private_blockchain

Repository files navigation

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