To setup and start the project do the following:
- Get the project.
- Run command npm install to install the project dependencies.
- Run command npm start in the root directory to start the project. You can also start it using node app.js.
- To get a block using its height make a GET request to the following URL:
http://localhost:8000/block/height
where height in the above url is a positive integer. - To post a block with the a body payload make a POST request to the following URL:
http://localhost:8000/block
An example request looks like the following:
{
"body": "Testing block with test string data"
}