With this system, you can interact with a Private Blockchain to submit and retrieve blockchain data
curl -X GET \
http://localhost:8000/block/0 \
-H 'Content-Type: application/x-www-form-urlencoded'
curl -X POST \
http://localhost:8000/block/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'body=testing%20block'
Local server
- Node.js - https://nodejs.org/en/
- Express - https://expressjs.com/
- Crypto-js - https://www.npmjs.com/package/crypto-js
- Body-parser - https://www.npmjs.com/package/body-parser
- LevelDB - http://leveldb.org/
To set up the project for review do the following:
- Download the project or clone the repository --> git clone https://github.com/gtcabral/RestfullPrivateBlockchain
- Install node.js (https://nodejs.org/en/download/)
- Run command npm install to install the project dependencies.
- Run command node app.js in the root directory.
Get block by ID
curl -X GET \
http://localhost:8000/block/0 \
-H 'Content-Type: application/x-www-form-urlencoded'
Post Block with a body value
curl -X POST \
http://localhost:8000/block/ \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'body=testing%20block'