Skip to content

ahmadjawidjami/PrivateBlockchainAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project #3. Private Blockchain with GET and POST API Endpoints

I used express framework for creating the API.

To setup and start the project do the following:

  1. Get the project.
  2. Run command npm install to install the project dependencies.
  3. Run command npm start in the root directory to start the project. You can also start it using node app.js.

How to use the API

  1. 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.
  2. 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"
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors